#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>


#include "type.h"
#include "xml_conf.h"
#include "buf_misc.h"
#include "cli_main.h"

static I8 *cpXmlFile             = "cp /mnt/config/*.xml /mnt/usr/";
static I8 *config_file           = "/mnt/config/dev_config.xml";
static I8 *original_config_file  = "/mnt/usr/dev_config.xml";
static I8 *original_gsm_lte_config_file  = "/mnt/usr/gsm_lte_config.xml";
static I8 *config_tmp			 = "/mnt/config/dev_config.tmp";
I8 *log_file                     = "/mnt/usr/log/fep.log";

static I8 *unchang_cfg_file      = "/mnt/usr/unchang_config.xml";
static I8 *rm_unchang_cfg_file   = "rm /mnt/usr/unchang_config.xml";

DEV_CONF dev_conf;
FTPLOG ftpLog;
VERSION devVersion;
extern I8 *config_file_buf;
//common enable string
static I8 *en_string                     = "Enable";
//root
static I8 *root_string                   = "ConfigInfo";
//device info 
static I8 *devNum_string                 = "DevNumber";
static I8 *devNumRsv_string				 = "DevNumberReserve";
static I8 *tempThreshold_string			 = "TempThreshold";
static I8 *devName_string                = "DevName";
static I8 *type_string                   = "TypeModel";
static I8 *devType                       = "DevType";
static I8 *phone_string                  = "PhoneNumber";
static I8 *devAddr_string                = "DevAddresss";
static I8 *devPos_string                 = "DevPos";
static I8 *devPos_lo                     = "Longitude";
static I8 *devPos_la                     = "Latitude";
static I8 *devPos_he                     = "Height";
static I8 *RfSwitch                      = "RFSwitch";
static I8 *protocol                      = "Protocol";
static I8 *createTime                    = "CreateTime";
//gsm
static I8 *Wireless_string               = "WirelessInfo";
static I8 *Wireless_type                 = "Type";
static I8 *cap_itvl                      = "reDetectMinuts";
static I8 *isSupport                     = "isSupported";

static I8 *Wireless_gsm_type             = "GSM";
static I8 *wireless_base1		         = "BTS1";
static I8 *wireless_base2		         = "BTS2";
static I8 *Bts_band                      = "BAND";
static I8 *Bts_BCC                       = "BCC";
static I8 *Bts_MCC                       = "MCC";
static I8 *Bts_MNC                       = "MNC";
static I8 *Bts_LAC                       = "LAC";
static I8 *Bts_NEI                       = "NeighborsNumToSend";
static I8 *Bts_RSSI                      = "RSSIMin";
static I8 *Bts_THLD                      = "ThresholdDelta";
static I8 *Bts_captime                   = "CAPTIME";
static I8 *Bts_lowatt                    = "LOWATT";
static I8 *Bts_upatt                     = "UPATT";
static I8 *Bts_cnum                      = "CNUM";
static I8 *Bts_cro                       = "CRO";
static I8 *Bts_configMode                = "CONFIGMODE";
static I8 *Bts_workMode                  = "WORKMODE";
static I8 *Bts_startFreq900              = "STARTFREQ900";
static I8 *Bts_endFreq900                = "ENDFREQ900";
static I8 *Bts_startFreq1800             = "STARTFREQ1800";
static I8 *Bts_endFreq1800               = "ENDFREQ1800";
static I8 *Bts_freqOffset                = "FREQOFFSET";
static I8 *Bts_EquipmentId               = "EquipmentId";
static I8 *gain_string                   = "PAGain";
static I8 *PowerLevelStr                 = "PowerLevel";
//cdma
static I8 *Wireless_cdma_type            = "CDMA";
static I8 *sid                           = "SID";
static I8 *nid                           = "NID";
static I8 *pn                            = "PN";
static I8 *bsid                          = "BSID";
static I8 *regnum                        = "REGNUM";
static I8 *captime                       = "CAPTIME";
static I8 *dnatt                         = "LOWATT";
static I8 *upatt                         = "UPATT";
static I8 *workModel                     = "WORKMODEL";
static I8 *scanTime                      = "SCANTIME";
static I8 *scanPeriod                    = "SCANPERIOD";
static I8 *ResetModel                    = "RESETMODEL";
static I8 *freq1                         = "FREQ1";
static I8 *workMode1                     = "WORKMODE1";
static I8 *scantime1                     = "SCANTIME1";
static I8 *scancaptime1                  = "SCANCAPTIME1";
static I8 *neibor1Freq1                  = "NEIBOR1FREQ1";
static I8 *neibor2Freq1                  = "NEIBOR2FREQ1";
static I8 *neibor3Freq1                  = "NEIBOR3FREQ1";
static I8 *neibor4Freq1                  = "NEIBOR4FREQ1";
static I8 *freq2                         = "FREQ2";
static I8 *workMode2                     = "WORKMODE2";
static I8 *scantime2                     = "SCANTIME2";
static I8 *scancaptime2                  = "SCANCAPTIME2";
static I8 *neibor1Freq2                  = "NEIBOR1FREQ2";
static I8 *neibor2Freq2                  = "NEIBOR2FREQ2";
static I8 *neibor3Freq2                  = "NEIBOR3FREQ2";
static I8 *neibor4Freq2                  = "NEIBOR4FREQ2";
static I8 *freq3                         = "FREQ3";
static I8 *workMode3                     = "WORKMODE3";
static I8 *scantime3                     = "SCANTIME3";
static I8 *scancaptime3                  = "SCANCAPTIME3";
static I8 *neibor1Freq3                  = "NEIBOR1FREQ3";
static I8 *neibor2Freq3                  = "NEIBOR2FREQ3";
static I8 *neibor3Freq3                  = "NEIBOR3FREQ3";
static I8 *neibor4Freq3                  = "NEIBOR4FREQ3";
static I8 *freq4                         = "FREQ4";
static I8 *workMode4                     = "WORKMODE4";
static I8 *scantime4                     = "SCANTIME4";
static I8 *scancaptime4                  = "SCANCAPTIME4";
static I8 *neibor1Freq4                  = "NEIBOR1FREQ4";
static I8 *neibor2Freq4                  = "NEIBOR2FREQ4";
static I8 *neibor3Freq4                  = "NEIBOR3FREQ4";
static I8 *neibor4Freq4                  = "NEIBOR4FREQ4";

static I8 *Wireless_wcdma_type           = "WCDMA";
static I8 *Wireless_tdscdma_type         = "TDSCDMA";
static I8 *arfcn                         = "ARFCN";
static I8 *psc                           = "PSC";
static I8 *rac                           = "RAC";
static I8 *cellId                        = "CELLID";
static I8 *autoLac                       = "AUTOLAC";
static I8 *dac                           = "DAC";
static I8 *txPower                       = "TXPOWER";
static I8 *rxPower                       = "RXPOWER";
static I8 *pilot                         = "PILOT";
static I8 *redirect                      = "REDIRECT";

//lte
static I8 *Wireless_lte_type             = "LTE";
static I8 *tac_cycle                     = "TacCycle";
static I8 *Bts_cell                      = "Cell";
static I8 *Cell_Number                   = "Number";
static I8 *desc                          = "Desc";
static I8 *Operator                      = "Operator";
static I8 *bandWidth                     = "BandWidth";
static I8 *IsMeasureEnable               = "IsMeasureEnable";


static I8 *pci                           = "PCI";
static I8 *band                          = "Band";
static I8 *ul_earfcn                     = "ul-earfcn";
static I8 *dl_earfcn                     = "dl-earfcn";
static I8 *plmnid                        = "Plmnid";
static I8 *tac                           = "Tac";
static I8 *neiborcell                    = "NeiborCell";
static I8 *abnorfreq                     = "AbnorFreq";
static I8 *syncMode                      = "SyncMode";
static I8 *gpsTmDelay                    = "GpsTmDelay";
static I8 *isSaveFs                      = "isSaveFs";     
static I8 *wireless_base                 = "BTS"; 

static I8 *dl_att                        = "dl_att";

static I8 *Wireless_wifi_type            = "WIFI";

static I8 *bbu1exist                     = "Bbu1Exist";
static I8 *bbu2exist                     = "Bbu2Exist";
static I8 *bbu3exist                     = "Bbu3Exist";
static I8 *bbu4exist                     = "Bbu4Exist";
static I8 *bbu5exist                     = "Bbu5Exist";
static I8 *bbu6exist                     = "Bbu6Exist";
static I8 *bbu7exist                     = "Bbu7Exist";


static I8 *sniffer_time                  = "SnifferTime";
static I8 *cycle_string                  = "StatisticsInterval";
//set work mode
static I8 *workMode                      = "WorkMode";
static I8 *deviceMode                    = "DeviceMode";
static I8 *workPeriod                    = "WorkPeriod";
static I8 *powerOffTime                  = "PowerOffTime"; 

static I8 *pa_id                         = "Id";
static I8 *pa_name                       = "PA";
static I8 *pa_string                     = "PAInfo";


//server common string:
static I8 *srv_addr                      = "SrvAddress";
static I8 *open_port                     = "open_port";
static I8 *srv_port                      = "Port";
static I8 *heart_beat                    = "HeartBeat";
static I8 *disable_auth	                 = "disable_auth";
static I8 *cer_file                      = "cer_file";
static I8 *AuthSrv_string                = "AuthServer";
static I8 *MngSrv_string                 = "DevManageServer";
static I8 *DataSrv_strig                 = "UpDataServer";
static I8 *interval                      = "Interval";

//SMS
static I8 *sms_string                    = "SMS";
static I8 *sms_msg                       = "Maintain";
static I8 *sms_key                       = "Smskey";
//sniffer

static I8 *sniffer_string                = "Sniffer";
static I8 *sniffer_mode                  = "BccMode";
static I8 *sniffer_auto                  = "IsAuto";
static I8 *sniffer_hour                  = "Hour";
static I8 *sniffer_min                   = "Minute";
static I8 *sniffer_sec                   = "Second";
static I8 *sniffer_cycle                 = "Cycle";

//stroage
static I8 *storage_string                = "Storage";

//restart System
static I8 *restart_string                = "Restart";
static I8 *save_time                     = "SaveTime";
static I8 *ftpStr                        = "FTP";
static I8 *ftpserverStr                  = "Ftpserver";
static I8 *ftpuserStr                    = "Ftpuser";
static I8 *ftppasswdStr                  = "Ftppasswd";
static I8 *ftpportStr                    = "Ftpport";
static I8 *ftptimerStr                   = "Ftptimer";
static I8 *ftpmaxcountStr                = "Ftpmaxcount";
static I8 *ftpbsicStr                    = "Ftpbsic";
static I8 *ftpcompanyStr                 = "Ftpcompany";
static I8 *ftpuptimeStr                  = "Ftpuptime";
static I8 *ftpKeyStr                     = "FtpKey";
static I8 *ftpIVStr                      = "FtpIV";
static I8 *ftpDataSourceStr              = "FtpDataSource";
static I8 *ftpDataDestStr                = "FtpDataDest";
static I8 *ftpCompressFileNumStr         = "FtpCompressFileNum";
static I8 *ftpSingleFileNumStr           = "FtpSingleFileNum"; 
static I8 *ftpenableStr                  = "Ftpenable";
static I8 *ftpcityNumStr                 = "FtpcityNum";
static I8 *ftpMacenable                  = "FtpMacenable";
static I8 *ftpMactimerStr                = "FtpMactimer";
static I8 *ftpMacmaxcountStr             = "FtpMacmaxcount";  
static I8 *ftpcompanyNameStr             = "FtpcompanyName";
static I8 *ftpcompanyAddrStr             = "FtpcompanyAddr";
static I8 *ftpcontactorStr               = "Ftpcontactor";
static I8 *ftpcontactorTelStr            = "FtpcontactorTel";
static I8 *ftpcontactorMailStr           = "FtpcontactorMail";   
static I8 *ftpplaceNameStr               = "FtpplaceName";  
static I8 *ftpplaceCodeStr               = "FtpplaceCode";   
static I8 *ftpdirStr                     = "Ftpdir";   
static I8 *siteAreaStr                   = "siteArea";
static I8 *hourStr                       = "hour";
static I8 *minuteStr                     = "minute";
static I8 *ltStr                         = "&lt;";
static I8 *gtStr                         = "&gt;";
static I8 *ampStr                        = "&amp;";
static I8 *aposStr                       = "&apos;";
static I8 *quotStr                       = "&quot;";
static I8 *freqListStr                   = "FreqList";
static I8 *ctFreqListStr                 = "CtFreqList";
static I8 *snifferTypeStr				 = "snifferType";
static I8 *minRxLevStr                   = "MinRxLev";
static I8 *minRxLevOffsetStr             = "MinRxLevOffset";
static I8 *configModeStr                 = "ConfigMode";

// Redirect
static I8 *redirectStr					 = "Redirect";
static I8 *enableStr                     = "Enable";
static I8 *cellNumberStr				 = "CellNumber";
static I8 *cellIdStr                     = "ID";
static I8 *ranTypeStr					 = "RanType";
static I8 *bandStr						 = "Band";
static I8 *freq1Str						 = "Freq1";
static I8 *freq2Str						 = "Freq2";
static I8 *freq3Str						 = "Freq3";
static I8 *freq4Str						 = "Freq4";
static I8 *freq5Str						 = "Freq5";
static I8 *imsi1Str                      = "Imsi1";
static I8 *imsi2Str                      = "Imsi2";
static I8 *imsi3Str                      = "Imsi3";
static I8 *imsi4Str                      = "Imsi4";
static I8 *imsi5Str                      = "Imsi5";

#if 0
static void get_local_ip_addr(DEV_CONF *dev_conf)
{
    int sockfd = -1;
    struct sockaddr_in *addr;
    struct ifreq tmp;
    //memset(&tmp, 0, sizeof(struct ifreq));
   // strcpy(tmp.ifr_name, "eth1");
    strcpy(tmp.ifr_name, "eth1");
    while(1)
    {
        sockfd = socket(AF_INET, SOCK_STREAM, 0);
        if (sockfd < 0)
            continue;
        if ((ioctl(sockfd, SIOCGIFADDR, &tmp)) < 0)
        {
           close(sockfd);
           sockfd = -1;
        }
        else
        {
            addr = (struct sockaddr_in *)&(tmp.ifr_addr);
            sprintf(dev_conf->mng.laddr, "%s", (char *)inet_ntoa(addr->sin_addr));
            close(sockfd); 
            break;
        }
        sleep(1);
       
    }
   cli_app_log(CLI_LOG_ERROR, "sucess get addr %s\n ", dev_conf->mng.laddr);
   return ;

}
#endif

static void handleXmlSpecialChar(I8 *inData, I8 *outData)
{
    I32 index = 0, i = 0;
    for ( i = 0; i < strlen(inData); i++)
    {
        switch(inData[i])
        {
            case '<':
                memcpy(outData + index, ltStr, strlen(ltStr));
                index += strlen(ltStr);
                break;

            case '>':
                memcpy(outData + index, gtStr, strlen(gtStr));
                index += strlen(gtStr);
                break;

            case '&':
                memcpy(outData + index, ampStr, strlen(ampStr));
                index += strlen(ampStr);
                break;

            case '"':
                memcpy(outData + index, quotStr, strlen(quotStr));
                index += strlen(quotStr);
                break;

            default:
                outData[index++] = inData[i];

        }

    }
}

void conversionConfig(WirelessConfig *config)
{
    WIRELESS_GSM_INFO *capGsm = &dev_conf.capGsm;
    WIRELESS_LTE_INFO *capLte = &dev_conf.capLte;
    WIRELESS_CDMA_INFO *capCdma = &dev_conf.capCdma;
    WIRELESS_WCDMA_INFO *capWcdma = &dev_conf.capWcdma;
    WIRELESS_TDSCDMA_INFO *capTdscdma = &dev_conf.capTdscdma;
    WIRELESS_WIFI_INFO  *capWifi = &dev_conf.capWifi;   
    gsmConfig *ccapGsm = &config->capGsm;
    cdmaRadioConfig *ccapCdma = &config->capCdma;
    lteConfig *ccapLte = &config->capLte;
    wcdmaRadioConfig *ccapWcdma = &config->capWcdma;
    wcdmaRadioConfig *ccapTdscdma = &config->capTdscdma;
    wifiRadioConfig *ccapWifi = &config->capWifi;
    if (atoi(capGsm->isSupported) == 1)
    {
        config->wirelessSupported[7] = 1;
        config->wirelessSupported[8] = 1;
        ccapGsm->intvl = atoi(capGsm->intvl);
        ccapGsm->gsm[0].enable = atoi(capGsm->gsm1.enable);
        ccapGsm->gsm[0].band = atoi(capGsm->gsm1.band);
        ccapGsm->gsm[0].bcc = atoi(capGsm->gsm1.bcc);
        ccapGsm->gsm[0].mcc = atoi(capGsm->gsm1.mcc);
        ccapGsm->gsm[0].mnc = atoi(capGsm->gsm1.mnc);
        ccapGsm->gsm[0].lac = atoi(capGsm->gsm1.lac);
        ccapGsm->gsm[0].captime = atoi(capGsm->gsm1.captime);
        ccapGsm->gsm[0].lowatt = atoi(capGsm->gsm1.lowatt);
        ccapGsm->gsm[0].upatt = atoi(capGsm->gsm1.upatt);
        ccapGsm->gsm[0].configMode = atoi(capGsm->gsm1.configMode);

        ccapGsm->gsm[1].enable = atoi(capGsm->gsm2.enable);
        ccapGsm->gsm[1].band = atoi(capGsm->gsm2.band);
        ccapGsm->gsm[1].bcc = atoi(capGsm->gsm2.bcc);
        ccapGsm->gsm[1].mcc = atoi(capGsm->gsm2.mcc);
        ccapGsm->gsm[1].mnc = atoi(capGsm->gsm2.mnc);
        ccapGsm->gsm[1].lac = atoi(capGsm->gsm2.lac);
        ccapGsm->gsm[1].captime = atoi(capGsm->gsm2.captime);
        ccapGsm->gsm[1].lowatt = atoi(capGsm->gsm2.lowatt);
        ccapGsm->gsm[1].upatt = atoi(capGsm->gsm2.upatt);
        ccapGsm->gsm[1].configMode = atoi(capGsm->gsm2.configMode);
    }

    if (atoi(capLte->isSupported) == 1)
    {
        int i = 0;
        for (; i < LTE_CELL_NUM; i++)
        {
            if (atoi(capLte->lte[i].enable) == 1)
            {
                config->wirelessSupported[i] = 1;
                ccapLte->lte[i].enable = atoi(capLte->lte[i].enable);
                ccapLte->lte[i].band = atoi(capLte->lte[i].band);
                ccapLte->lte[i].bandWidth = atoi(capLte->lte[i].bandWidth);
                ccapLte->lte[i].syncMode = atoi(capLte->lte[i].syncMode);
                ccapLte->lte[i].gpsTmDelay = atoi(capLte->lte[i].gpsTmDelay);
                ccapLte->lte[i].ul_earfcn = atoi(capLte->lte[i].ul_earfcn);
                ccapLte->lte[i].dl_earfcn = atoi(capLte->lte[i].dl_earfcn);
                ccapLte->lte[i].plmnid = atoi(capLte->lte[i].plmnid);
                ccapLte->lte[i].tac = atoi(capLte->lte[i].tac);
                ccapLte->lte[i].pci = atoi(capLte->lte[i].pci);
                ccapLte->lte[i].isSaveFs = atoi(capLte->lte[i].isSaveFs);
                strcpy(ccapLte->lte[i].neiborcell, capLte->lte[i].neiborcell);
                strcpy(ccapLte->lte[i].abnorfreq, capLte->lte[i].abnorfreq);
            }
        }
    }

    if (atoi(capWcdma->isSupported) == 1)
    {
        config->wirelessSupported[10] = 1;
        ccapWcdma->enable = atoi(capWcdma->enable);
        ccapWcdma->mcc = atoi(capWcdma->wcdma.mcc);
        ccapWcdma->mnc = atoi(capWcdma->wcdma.mnc);
        ccapWcdma->lac = atoi(capWcdma->wcdma.lac);
        ccapWcdma->psc = atoi(capWcdma->wcdma.psc);
        ccapWcdma->arfcn = atoi(capWcdma->wcdma.arfcn);
        ccapWcdma->rac = atoi(capWcdma->wcdma.rac);
        ccapWcdma->cellId = atoi(capWcdma->wcdma.cellId);
        ccapWcdma->autoLac = atoi(capWcdma->wcdma.autoLac);
    }
    
    if (atoi(capTdscdma->isSupported) == 1)
    {
        config->wirelessSupported[11] = 1;
        ccapTdscdma->enable = atoi(capTdscdma->enable);
        ccapTdscdma->mcc = atoi(capTdscdma->tdscdma.mcc);
        ccapTdscdma->mnc = atoi(capTdscdma->tdscdma.mnc);
        ccapTdscdma->lac = atoi(capTdscdma->tdscdma.lac);
        ccapTdscdma->psc = atoi(capTdscdma->tdscdma.psc);
        ccapTdscdma->arfcn = atoi(capTdscdma->tdscdma.arfcn);
        ccapTdscdma->rac = atoi(capTdscdma->tdscdma.rac);
        ccapTdscdma->cellId = atoi(capTdscdma->tdscdma.cellId);
        ccapTdscdma->autoLac = atoi(capTdscdma->tdscdma.autoLac);
    }

    if (atoi(capWifi->isSupported) == 1)
    {
        config->wirelessSupported[12] = 1;
        ccapWifi->enable = atoi(capWifi->enable);
        ccapWifi->isSupported = atoi(capWifi->isSupported);
        ccapWifi->intvl = atoi(capWifi->intvl);
    }
}

static I32 xml_file_cp(I8 * dst, I8 * src)
{
    FILE *dstfd = NULL, *srcfd = NULL;
    struct stat filestat;
    if (config_file_buf == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "File buf is not ready\n");
        return -1;
    }
    if ((srcfd = fopen(src, "rb")) == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "Can not read src\n");
        return -1;
    }

    if ((dstfd = fopen(dst, "wb")) == NULL) 
	{

        cli_app_log(CLI_LOG_CRITICAL, "Can not create dst\n");
        fclose(srcfd);
        return -1;
    }
    stat(src, &filestat);
    if (filestat.st_size == 0 || filestat.st_size >= FILE_BUF_LEN) 
	{
        fclose(srcfd);
        fclose(dstfd);
        cli_app_log(CLI_LOG_CRITICAL, "File size out of range\n");
        return -1;
    }
    fread(config_file_buf, filestat.st_size, 1, srcfd);
    fwrite(config_file_buf, 1, filestat.st_size, dstfd);

    fflush(dstfd);

    fclose(srcfd);
    fclose(dstfd);
    return 0;
}

I32 xml_config_overwirte(I32 mode)
{
    if (mode == CONFIG_MODE_BACKUP)
        return xml_file_cp(config_tmp, config_file);
    else if (mode == CONFIG_MODE_RESTORE)
        return xml_file_cp(config_file, config_tmp);

    return -1;
}

//here to copy old config 
void xml_set_node(CNODE_INFO *node, xmlNodePtr cur)
{
    xmlChar *prop;
    if ( node->lvl2 == NULL )
    {
        while ( cur != NULL )
        {
            if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->name)) )
            {
                xmlNodeSetContent(cur, (const xmlChar *)node->data);                
            }       
            cur = cur->next;
        }
    }
    else if ( node->lvl3 == NULL )
    {
        while ( cur != NULL )
        {
            if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2)) )
            {
             
               if ( node->type == NULL || ( strcmp( (I8 *)xmlGetProp(cur, (const xmlChar *)Wireless_type), node->type) ==  0 )  )
               {
                    cur = cur->xmlChildrenNode;
                    while ( cur != NULL )
                    {
                        if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->name)) )
                        {
        
                            xmlNodeSetContent(cur, (const xmlChar *)node->data);                            
                        }
                        cur= cur->next;
                    } 
                    return;
                }
            }
            cur=cur->next;
        }
                 
    }
    else if ( node->lvl4 == NULL )
    {

        while ( cur != NULL )
        {
            if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2)) )
            {
                if ( node->type == NULL || ( strcmp( (I8 *)xmlGetProp(cur, (const xmlChar *)Wireless_type), node->type) ==  0 )  )
                {

                    cur = cur->xmlChildrenNode;
                    while ( cur != NULL )
                    {
                        if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl3)) )
                        {                             
                            prop = xmlGetProp(cur, (const xmlChar *)pa_id);
                            if ( prop == NULL )
                            {
                                cur = cur->xmlChildrenNode;
                                while ( cur != NULL )
                                {
                                    if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->name)) )
                                    {
                                        xmlNodeSetContent(cur, (const xmlChar *)node->data);                        
                                    }
                                    cur= cur->next;                           
                                }
                                return;
 
                            }  
                            else 
                            {                             
                                if ( atoi((I8 *)prop) == node->id )
                                {
                                    cur = cur->xmlChildrenNode;
                                    while ( cur != NULL )
                                    {
                                        if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->name)) )
                                        {
                                            xmlNodeSetContent(cur, (const xmlChar *)node->data);                        
                                        }
                                        cur= cur->next;                           
                                    }
                                    xmlFree(prop);
                                    return;
                                }                    
                                xmlFree(prop);
                            }
                            
                         }
                         cur = cur->next;
                     }
                    return;
                }
            }
            cur = cur->next;
        }

    }
    else
    {
        while ( cur != NULL )
        {
            if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2)) )
            {           
                cur = cur->xmlChildrenNode;
                while (cur != NULL )
                {
                    if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl3)) )
                    {
                        cur = cur->xmlChildrenNode;
                        while ( cur != NULL )
                        {
                            if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl4)) &&
                                (atoi((I8 *)xmlGetProp(cur, (const xmlChar *)Cell_Number)) == node->id) )
                            {
                                cur = cur->xmlChildrenNode;
                                while ( cur != NULL )
                                {
                                    if ( (!xmlStrcmp(cur->name, (const xmlChar *)node->name)) )
                                    {
                                        xmlNodeSetContent(cur, (const xmlChar *)node->data);                        
                                    }
                                    cur= cur->next;  
                                }
                                return;
                            }
                            cur = cur->next; 
                        }
                        return;
                    }
                    cur = cur->next;
                }
                return;

            }
            cur = cur->next;
        }
    } 

}

void xml_set_posInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};

    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devPos_lo)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = devPos_lo;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devPos_la)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = devPos_la;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devPos_he)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = devPos_he;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        cur_old = cur_old->next;

      
    }

}

void xml_set_SrvInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)disable_auth)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = disable_auth;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cer_file)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = cer_file;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)srv_addr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = srv_addr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)srv_port)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = srv_port;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)open_port)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = open_port;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)heart_beat)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = heart_beat;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)interval)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = interval;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cycle_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = cycle_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
    
        cur_old = cur_old->next;
    }
}

void xml_set_cellInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};  
    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)desc)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = desc;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }     
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Operator)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Operator;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)bandWidth)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = bandWidth;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)IsMeasureEnable)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = IsMeasureEnable;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }     
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)pci)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = pci;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)band)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = band;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)syncMode)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = syncMode;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)gpsTmDelay)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = gpsTmDelay;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSaveFs)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = isSaveFs;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ul_earfcn)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ul_earfcn;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)dl_earfcn)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = dl_earfcn;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)plmnid)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = plmnid;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)tac)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = tac;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neiborcell)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neiborcell;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)abnorfreq)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = abnorfreq;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
		else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)freqListStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = freqListStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
	    else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ctFreqListStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ctFreqListStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
	    else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)minRxLevStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = minRxLevStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }   
	    else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)minRxLevOffsetStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = minRxLevOffsetStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
	    else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)configModeStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = configModeStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }   
        cur_old = cur_old->next;
    }
       

}

void xml_set_lte_bts(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    while ( cur_old != NULL )
    {    
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_cell)) )
        {
            node->lvl4 = Bts_cell;
            
            key = xmlGetProp(cur_old, (const xmlChar *)Cell_Number);
            if ( key == NULL )
            {
                return;
            }
            if ( atoi((I8 *)key - 1) < LTE_CELL_NUM )
            {
                node->id = atoi((I8 *)key);
                xml_set_cellInfo(node, doc_old, cur_old, cur_current);
            }
            xmlFree(key);
        }
        cur_old = cur_old->next;
    }

}

void xml_set_lte_wirelessInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cap_itvl)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = cap_itvl;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSupport)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = isSupport;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)tac_cycle)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = tac_cycle;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)snifferTypeStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = snifferTypeStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);          
        } 		
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)wireless_base)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = wireless_base;
            xml_set_lte_bts(node, doc_old, cur_old, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node lvl3 name is %s \n", node->lvl3);            
        }
        cur_old = cur_old->next;
    }
}

void xml_set_pa(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)gain_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = gain_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)dl_att)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = gain_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);           

        }
        cur_old = cur_old->next;

    }
    
}

void xml_set_paInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {          
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)pa_name)) )
        {

            key = xmlGetProp(cur_old, (const xmlChar *)pa_id);
            if ( key != NULL )
            {
                if ( (atoi((I8 *)key) - 1) < PA_NUM )
                {
                    node->id = atoi((I8 *)key);
                    node->lvl3 = pa_name;
                    cli_app_log(CLI_LOG_NOTICE, "NODE ID is %d \n", node->id);
                    xml_set_pa(node, doc_old, cur_old, cur_current);
                }
                xmlFree(key);
            }
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)gain_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = gain_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }


        cur_old = cur_old->next;
    }
}


void xml_set_gsm_bts(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};  
    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_band)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_band;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_BCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_BCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_MCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MNC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_MNC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_LAC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_LAC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }    
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_NEI)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_NEI;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_RSSI)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_RSSI;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_THLD)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_THLD;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_captime)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_captime;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_lowatt)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_lowatt;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_upatt)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_upatt;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_cnum)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_cnum;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_cro)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_cnum;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_configMode)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_configMode;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_workMode)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_workMode;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_startFreq900)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_startFreq900;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_endFreq900)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_endFreq900;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_startFreq1800)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_startFreq1800;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_endFreq1800)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_endFreq1800;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_freqOffset)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_freqOffset;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_EquipmentId)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_EquipmentId;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)PowerLevelStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = PowerLevelStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        cur_old = cur_old->next;
    }
}

void xml_set_gsm_wirelessInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cap_itvl)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = cap_itvl;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSupport)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = isSupport;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)wireless_base1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = wireless_base1;
            node->lvl4 = NULL;
            xml_set_gsm_bts(node, doc_old, cur_old, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node lvl3 name is %s \n", node->lvl3);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)wireless_base2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = wireless_base2;
            node->lvl4 = NULL;
            xml_set_gsm_bts(node, doc_old, cur_old, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node lvl3 name is %s \n", node->lvl3);            
        }
  
        cur_old = cur_old->next;
    }

}

void xml_set_cdma_bts(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};  
    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_BCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_BCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_BCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MNC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_MNC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sid)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sid;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)nid)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = nid;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)pn)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = pn;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)bsid)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = bsid;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)regnum)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = regnum;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)dnatt)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = dnatt;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)upatt)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = upatt;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workModel)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workModel;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scanTime)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scanTime;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scanPeriod)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scanPeriod;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ResetModel)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ResetModel;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ResetModel)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ResetModel;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)captime)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = captime;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)freq1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = freq1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workMode1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workMode1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scantime1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scantime1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scancaptime1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scancaptime1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor1Freq1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor1Freq1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor2Freq1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor2Freq1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor3Freq1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor3Freq1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor4Freq1)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor4Freq1;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)freq2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = freq2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workMode2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workMode2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scantime2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scantime2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scancaptime2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scancaptime2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor1Freq2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor1Freq2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor2Freq2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor2Freq2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor3Freq2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor3Freq2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor4Freq2)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor4Freq2;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)freq3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = freq3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workMode3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workMode3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scantime3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scantime3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scancaptime3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scancaptime3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor1Freq3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor1Freq3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor2Freq3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor2Freq3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor3Freq3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor3Freq3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor4Freq3)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor4Freq3;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)freq4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = freq4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workMode4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workMode4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scantime4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scantime4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)scancaptime4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = scancaptime4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor1Freq4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor1Freq4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor2Freq4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor2Freq4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor3Freq4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor3Freq4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)neibor4Freq4)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = neibor4Freq4;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        cur_old = cur_old->next;
    }

}



void xml_set_cdma_wirelessInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cap_itvl)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = cap_itvl;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSupport)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = isSupport;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)wireless_base)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = wireless_base;
            node->lvl4 = NULL;
            xml_set_cdma_bts(node, doc_old, cur_old, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node lvl3 name is %s \n", node->lvl3);            
        }

  
        cur_old = cur_old->next;
    }

}

void xml_set_wcdma_bts(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};  
    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_BCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_BCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MCC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_MCC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_MNC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_MNC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_LAC)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = Bts_LAC;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }    
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)rac)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = rac;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)psc)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = psc;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)arfcn)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = arfcn;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cellId)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name =  cellId;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)autoLac)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = autoLac;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)dac)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = dac;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)txPower)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = txPower;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)rxPower)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = rxPower;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)pilot)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = pilot;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)redirect)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = redirect;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }  
        cur_old = cur_old->next;
    }
}

void xml_set_wcdma_wirelessInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cap_itvl)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = cap_itvl;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSupport)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = isSupport;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)wireless_base)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = wireless_base;
            node->lvl4 = NULL;
            xml_set_wcdma_bts(node, doc_old, cur_old, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node lvl3 name is %s \n", node->lvl3);            
        } 
        cur_old = cur_old->next;
    }

}


void xml_set_wifi_wirelessInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {        
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)cap_itvl)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = cap_itvl;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)isSupport)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = isSupport;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            

        } 
        cur_old = cur_old->next;
    }

}
 

void xml_set_smsInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sms_msg)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sms_msg;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sms_key)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sms_key;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        cur_old = cur_old->next;
    }

}

void xml_set_WorkMode(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)deviceMode)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = deviceMode;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workPeriod)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = workPeriod;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)powerOffTime)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = powerOffTime;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        cur_old = cur_old->next;
    }    


}

void xml_set_cellSnfInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode; 
    I8 data[DEV_INFO_ADD_LEN] = {0};     
    while( cur_old != NULL )
    {    
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_hour)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sniffer_hour;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_min)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sniffer_min;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }  
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_sec)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = sniffer_sec;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }       
        cur_old = cur_old->next;       
    }
}

void xml_set_snifferTime(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;    

    while( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Bts_cell)) )
        {
            key = xmlGetProp(cur_old, (const xmlChar *)Cell_Number);
            if ( key != NULL )
            {
                    
                node->lvl4 = Bts_cell;
                node->id = atoi((I8 *)key);
                xml_set_cellSnfInfo(node, doc_old, cur_old, cur_current);
                xmlFree(key);
            }
        }
        cur_old = cur_old->next;
    }

}


void xml_set_snifferInfo(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_mode)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_mode;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_auto)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_auto;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_cycle)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_cycle;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }

        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)"FreqScope")) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = "FreqScope";
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_time)) )
        {
            node->lvl3 = sniffer_time;
            xml_set_snifferTime(node, doc_old, cur_old, cur_current);          
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_hour)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_hour;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_min)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_min;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_sec)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->lvl3 = NULL;
            node->name = sniffer_sec;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }

        cur_old = cur_old->next;
    }  

}
void xml_set_storage(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)save_time)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = save_time;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        cur_old = cur_old->next;
    }    
}

void  xml_set_restart(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)en_string)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = en_string;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)hourStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = hourStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)minuteStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = minuteStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }

        cur_old = cur_old->next;
    }    
}


void  xml_set_ftp(CNODE_INFO *node, xmlDocPtr doc_old, xmlNodePtr cur_old, xmlNodePtr cur_current)
{
    xmlChar *key;
    cur_old=cur_old->xmlChildrenNode;
    I8 data[DEV_INFO_ADD_LEN] = {0};
    while ( cur_old != NULL )
    {     
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpserverStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpserverStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpuserStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpuserStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftppasswdStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftppasswdStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpportStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpportStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftptimerStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftptimerStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpmaxcountStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpmaxcountStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpbsicStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpbsicStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcompanyStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcompanyStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
       
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpuptimeStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpuptimeStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpKeyStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            I8 tmpdata[DEV_INFO_PAR2_LEN] = {0};
            strcpy(data, (I8 *)key);
            handleXmlSpecialChar(data, tmpdata);
            xmlFree(key);
            node->name = ftpKeyStr;
            node->data = tmpdata;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpIVStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            I8 tmpdata[DEV_INFO_PAR2_LEN] = {0};
            strcpy(data, (I8 *)key);
            handleXmlSpecialChar(data, tmpdata);
            xmlFree(key);
            node->name = ftpIVStr;
            node->data = tmpdata;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpSingleFileNumStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpSingleFileNumStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);                      
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpDataSourceStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpDataSourceStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpDataDestStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpDataDestStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpCompressFileNumStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpCompressFileNumStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpenableStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpenableStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcityNumStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcityNumStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpMacenable)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpMacenable;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpMactimerStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpMactimerStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpMacmaxcountStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpMacmaxcountStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcompanyNameStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcompanyNameStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcompanyAddrStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcompanyAddrStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcontactorStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcontactorStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcontactorTelStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcontactorTelStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpcontactorMailStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpcontactorMailStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpplaceNameStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpplaceNameStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpplaceCodeStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpplaceCodeStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpdirStr)) )
        {
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node->name = ftpdirStr;
            node->data = data;
            xml_set_node(node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node->name, node->data);            
        }
        cur_old = cur_old->next;
    }    
}


void xml_cp_old_config()
{
    I32 tmp = 0;
    struct stat configFileStat;
    tmp = stat("/mnt/config/dev_Config.xml", &configFileStat);
    if ( tmp != -1 )
    {
        system("mv /mnt/config/dev_config.xml /mnt/usr/ ");
        rename("/mnt/config/dev_Config.xml", config_file);
    }


    xmlDocPtr doc_current;
    xmlDocPtr doc_old;
    xmlNodePtr cur_current;
    xmlNodePtr cur_old;
    xmlChar *key;
    doc_current = xmlParseFile(config_file);
    doc_old = xmlParseFile(original_config_file);

    if ( doc_current == NULL ) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "Document not parsed successfully. \n");
        return ;
    }
    
    if ( doc_old == NULL )
    {
        cli_app_log(CLI_LOG_INFO, "no such document  return\n");
        doc_old = xmlParseFile(original_gsm_lte_config_file);
        if ( doc_old == NULL )
        { 
            cli_app_log(CLI_LOG_INFO, "no such document %s \n", original_gsm_lte_config_file);
        }
        return;
    }

    cur_current = xmlDocGetRootElement(doc_current);
    if (cur_current == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "empty document\n");
        xmlFreeDoc(doc_current);
        return;
    }

    if (xmlStrcmp(cur_current->name, (const xmlChar *)root_string)) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "document of the wrong type, root node != %s\n",
                    root_string);
        xmlFreeDoc(doc_current);
        return;
    }  

    cur_old = xmlDocGetRootElement(doc_old);
    if (cur_old == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "empty document\n");
        xmlFreeDoc(doc_old);
        xmlFreeDoc(doc_current);
        return;
    }

    if (xmlStrcmp(cur_old->name, (const xmlChar *)root_string)) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "document of the wrong type, root node != %s\n",
                    root_string);
        xmlFreeDoc(doc_old);
        xmlFreeDoc(doc_current);
        return;
    } 
    cur_current = cur_current->xmlChildrenNode;
    cur_old = cur_old->xmlChildrenNode;    
    I8 data[DEV_INFO_ADD_LEN] = {0};
    CNODE_INFO node;
    memset(&node, 0, sizeof(CNODE_INFO));
    while ( cur_old != NULL )
    {
        if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devNum_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_old, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = devNum_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);

        }
		else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devNumRsv_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = devNumRsv_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
		else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)tempThreshold_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = tempThreshold_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devName_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = devName_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devType)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = devType;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)type_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = type_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)phone_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = phone_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)siteAreaStr)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = siteAreaStr;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devAddr_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = devAddr_string;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)RfSwitch)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = RfSwitch;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }		
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)protocol)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = protocol;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)"UploadMode")) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = "UploadMode";
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)createTime)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            memset(data, 0, DEV_INFO_ADD_LEN);
            key = xmlNodeListGetString(doc_current, cur_old->xmlChildrenNode, 1);
            strcpy(data, (I8 *)key);
            xmlFree(key);
            node.name = createTime;
            node.data = data;
            xml_set_node(&node, cur_current);
            cli_app_log(CLI_LOG_NOTICE, "cp node name is %s node data is %s \n", node.name, node.data);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)devPos_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = devPos_string;
            xml_set_posInfo(&node, doc_old, cur_old, cur_current);

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)AuthSrv_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = AuthSrv_string;
            xml_set_SrvInfo(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)MngSrv_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = MngSrv_string;
            xml_set_SrvInfo(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)DataSrv_strig)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = DataSrv_strig;
            xml_set_SrvInfo(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)Wireless_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = Wireless_string;
            key = xmlGetProp(cur_old, (const xmlChar *)Wireless_type);
            if ( key != NULL )
            {
                if ( (strcmp(Wireless_lte_type, (I8 *)key)) == 0)
                {
                    node.type = Wireless_lte_type;
                    xml_set_lte_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_gsm_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_gsm_type;
                    xml_set_gsm_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_cdma_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_cdma_type;
                    xml_set_cdma_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_wcdma_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_wcdma_type;
                    xml_set_wcdma_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_tdscdma_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_tdscdma_type;
                    xml_set_wcdma_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_wifi_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_wifi_type;
                    xml_set_wifi_wirelessInfo(&node, doc_old, cur_old, cur_current);
                }
                xmlFree(key);
            }
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)pa_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = pa_string;
            key = xmlGetProp(cur_old, (const xmlChar *)Wireless_type);
            if ( key != NULL )
            {
                if ( (strcmp(Wireless_lte_type, (I8 *)key)) == 0)
                {
                    node.type = Wireless_lte_type;
                    xml_set_paInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_gsm_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_gsm_type;
                    xml_set_paInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_cdma_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_cdma_type;
                    xml_set_paInfo(&node, doc_old, cur_old, cur_current);
                }
                xmlFree(key);
            }
            else 
            {
                // no wireless type  is lte device

                memset(&node, 0, sizeof(CNODE_INFO));
                node.lvl2 = pa_string;
                node.type = Wireless_lte_type;
                cli_app_log(CLI_LOG_NOTICE, " %s %s \n", node.lvl2, node.type);
                xml_set_paInfo(&node, doc_old, cur_old, cur_current);            

            }
            

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sms_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = sms_string;
            xml_set_smsInfo(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)workMode)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = workMode;
            xml_set_WorkMode(&node, doc_old, cur_old, cur_current);
        }        
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)sniffer_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = sniffer_string;            
            key = xmlGetProp(cur_old, (const xmlChar *)Wireless_type);
            if ( key != NULL )
            {
                if ( (strcmp(Wireless_lte_type, (I8 *)key)) == 0)
                {
                    node.type = Wireless_lte_type;
                    xml_set_snifferInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_gsm_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_gsm_type;
                    xml_set_snifferInfo(&node, doc_old, cur_old, cur_current);
                }
                else if ( (strcmp(Wireless_cdma_type, (I8 *)key)) == 0 )
                {
                    node.type = Wireless_cdma_type;
                    xml_set_snifferInfo(&node, doc_old, cur_old, cur_current);
                }
                xmlFree(key);
            }

        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)storage_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = storage_string;
            xml_set_storage(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)restart_string)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = restart_string;
            xml_set_restart(&node, doc_old, cur_old, cur_current);
        }
        else if ( (!xmlStrcmp(cur_old->name, (const xmlChar *)ftpStr)) )
        {
            memset(&node, 0, sizeof(CNODE_INFO));
            node.lvl2 = ftpStr;
            xml_set_ftp(&node, doc_old, cur_old, cur_current);
        }
        cur_old = cur_old->next;
    }
    xmlSaveFormatFile(config_file, doc_current, 0);
    xmlFreeDoc(doc_old);
    xmlFreeDoc(doc_current);
    I8 cmd[128] = {0};
    sprintf(cmd, "rm %s", original_config_file);
    system(cmd);
}

//end of copy config

//start get devconfig
static I32 xml_get_storage_Info(STORAGE_INFO * info, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)save_time))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->peroid, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", save_time, info->peroid);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;
}

static I32 xml_get_restart_Info(RESTART_INFO * info, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, info->enable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)hourStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->hour, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", hourStr, info->enable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)minuteStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->min, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", minuteStr, info->enable);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;
}


static I32 xml_get_posInfo(DEV_INFO * info, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
          
        if ((!xmlStrcmp(cur->name, (const xmlChar *)devPos_lo))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->pos_lo, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devPos_lo, info->pos_lo);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devPos_la))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->pos_la, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devPos_la, info->pos_la);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devPos_he))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->pos_he, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devPos_he, info->pos_he);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->gpsEnable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, info->gpsEnable);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;
}

static I32 xml_get_srvInfo(SRV_INFO * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode; 
	while (cur != NULL) 
	{
		if ((!xmlStrcmp(cur->name, (const xmlChar *)disable_auth))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->disable_auth, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", disable_auth, conf->disable_auth);
            xmlFree(key);
        }
		
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)cer_file))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->cer_file, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cer_file, conf->cer_file);
            xmlFree(key);
        } 
		
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)srv_addr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->addr, (I8 *) key);
           cli_app_log(CLI_LOG_NOTICE, "%s %s \n", srv_addr, conf->addr);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)srv_port))) 
        {			
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->port, (I8 *) key);
           cli_app_log(CLI_LOG_NOTICE, "%s %s \n", srv_port, conf->port);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)open_port))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->open_port, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", open_port, conf->open_port);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)heart_beat))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->hb, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", heart_beat, conf->hb);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)interval))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->itvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", interval, conf->itvl);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)cycle_string)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->cycle, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cycle_string, conf->cycle);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;
}

static I32 xml_get_dataSrvInfo(SRV_INFO * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) {
        if ((!xmlStrcmp(cur->name, (const xmlChar *)srv_addr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->addr, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", srv_addr, conf->addr);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)srv_port))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->port, (I8 *) key);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)open_port))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->open_port, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", open_port, conf->open_port);
            xmlFree(key);
        } 

        else if ((!xmlStrcmp(cur->name, (const xmlChar *)heart_beat))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->hb, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", heart_beat, conf->hb);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)interval))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->itvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", interval, conf->itvl);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;
}

static I32 xml_get_gsm_btsInfo(GSM_INFO * info, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, info->enable);
            xmlFree(key);
        }

        if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_band))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->band, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_band, info->band);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_BCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_BCC, info->bcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MCC, info->mcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MNC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mnc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MNC, info->mnc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_LAC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->lac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_LAC, info->lac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_NEI))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->nei, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_NEI, info->nei);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_RSSI))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rssi, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_RSSI, info->rssi);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_THLD))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->thld, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_THLD, info->thld);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_captime))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->captime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_captime, info->captime);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_lowatt))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->lowatt, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_lowatt, info->lowatt);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_upatt))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->upatt, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_upatt, info->upatt);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_cnum))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->cnum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_cnum, info->cnum);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_cro))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->cro, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_cro, info->cro);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_configMode))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->configMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_configMode, info->configMode);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_workMode))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_workMode, info->workMode);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_startFreq900))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->startFreq900, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_startFreq900, info->startFreq900);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_endFreq900))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->endFreq900, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_endFreq900, info->endFreq900);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_startFreq1800))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->startFreq1800, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_startFreq1800, info->startFreq1800);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_endFreq1800))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->endFreq1800, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_endFreq1800, info->endFreq1800);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_freqOffset))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freqOffset, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_freqOffset, info->freqOffset);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_EquipmentId))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->EquipmentId, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_EquipmentId, info->EquipmentId);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)PowerLevelStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->PowerLevel, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", PowerLevelStr, info->PowerLevel);
            xmlFree(key);
        }
        cur = cur->next;
    }

    return 0;
}

static I32 xml_get_gsm_wirelessInfo(WIRELESS_GSM_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)cap_itvl))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->intvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cap_itvl, conf->intvl);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base1)))
            xml_get_gsm_btsInfo(&conf->gsm1, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base2)))
            xml_get_gsm_btsInfo(&conf->gsm2, doc, cur);
        cur = cur->next;
    }
    return 0;
}

static I32 xml_get_cdma_btsInfo(WIRELESS_CDMA_INFO * cinfo, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    CDMA_INFO * info = &cinfo->cdma;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_BCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_BCC, info->bcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MCC, info->mcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MNC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mnc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MNC, info->mnc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sid))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->sid, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sid, info->sid);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)nid))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->nid, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", nid, info->nid);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)pn))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->pn, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", pn, info->pn);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bsid))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bsid, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bsid, info->bsid);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)regnum))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->regnum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", regnum, info->regnum);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)dnatt))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dnatt, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", dnatt, info->dnatt);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)upatt))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->upatt, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", upatt, info->upatt);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workModel))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workModel, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workModel, info->workModel);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scanTime))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scanTime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scanTime, info->scanTime);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scanPeriod))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scanPeriod, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scanPeriod, info->scanPeriod);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ResetModel))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ResetModel, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ResetModel, info->ResetModel);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)captime))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->captime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", captime, info->captime);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)freq1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freq1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", freq1, info->freq1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workMode1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workMode1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workMode1, info->workMode1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scantime1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scantime1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scantime1, info->scantime1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scancaptime1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scancaptime1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scancaptime1, info->scancaptime1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor1Freq1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor1Freq1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor1Freq1, info->neibor1Freq1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor2Freq1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor2Freq1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor2Freq1, info->neibor2Freq1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor3Freq1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor3Freq1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor3Freq1, info->neibor3Freq1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor4Freq1))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor4Freq1, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor4Freq1, info->neibor4Freq1);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)freq2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freq2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", freq2, info->freq2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workMode2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workMode2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workMode2, info->workMode2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scantime2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scantime2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scantime2, info->scantime2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scancaptime2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scancaptime2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scancaptime2, info->scancaptime2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor1Freq2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor1Freq2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor1Freq2, info->neibor1Freq2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor2Freq2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor2Freq2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor2Freq2, info->neibor2Freq2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor3Freq2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor3Freq2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor3Freq2, info->neibor3Freq2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor4Freq2))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor4Freq2, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor4Freq2, info->neibor4Freq2);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)freq3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freq3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", freq3, info->freq3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workMode3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workMode3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workMode3, info->workMode3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scantime3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scantime3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scantime3, info->scantime3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scancaptime3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scancaptime3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scancaptime3, info->scancaptime3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor1Freq3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor1Freq3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor1Freq3, info->neibor1Freq3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor2Freq3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor2Freq3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor2Freq3, info->neibor2Freq3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor3Freq3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor3Freq3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor3Freq3, info->neibor3Freq3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor4Freq3))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor4Freq3, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor4Freq3, info->neibor4Freq3);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)freq4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freq4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", freq4, info->freq4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workMode4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->workMode4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workMode4, info->workMode4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scantime4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scantime4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scantime4, info->scantime4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)scancaptime4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->scancaptime4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", scancaptime4, info->scancaptime4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor1Freq4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor1Freq4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor1Freq4, info->neibor1Freq4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor2Freq4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor2Freq4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor2Freq4, info->neibor2Freq4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor3Freq4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor3Freq4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor3Freq4, info->neibor3Freq4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neibor4Freq4))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neibor4Freq4, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neibor4Freq4, info->neibor4Freq4);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(cinfo->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, cinfo->enable);
            xmlFree(key);
        }

        cur = cur->next;
    }

    return 0;
}

static I32 xml_get_cdma_wirelessInfo(WIRELESS_CDMA_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
       
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)cap_itvl))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->intvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cap_itvl, conf->intvl);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base)))
        {
            xml_get_cdma_btsInfo(conf, doc, cur);
        }
    
        cur = cur->next;
        
    }
    return 0;
}

static I32 xml_get_wcdma_btsInfo(WIRELESS_WCDMA_INFO * winfo, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    WCDMA_INFO *info = &winfo->wcdma;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_BCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_BCC, info->bcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MCC, info->mcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MNC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mnc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MNC, info->mnc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_LAC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->lac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_LAC, info->lac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)rac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", rac, info->rac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)psc))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->psc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", psc, info->psc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)arfcn))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->arfcn, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", arfcn, info->arfcn);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)cellId))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->cellId, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cellId, info->cellId);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)autoLac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->autoLac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", autoLac, info->autoLac);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)dac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", dac, info->dac);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)txPower))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->txPower, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", txPower, info->txPower);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)rxPower))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rxPower, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", rxPower, info->rxPower);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)pilot))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rxPower, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", pilot, info->rxPower);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)redirect))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->redirect, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", redirect, info->redirect);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(winfo->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, winfo->enable);
            xmlFree(key);
        }

        cur = cur->next;
    }

    return 0;
}

static I32 xml_get_wcdma_wirelessInfo(WIRELESS_WCDMA_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)cap_itvl))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->intvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cap_itvl, conf->intvl);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base)))
            xml_get_wcdma_btsInfo(conf, doc, cur);
        cur = cur->next;
    }
    return 0;
}



static I32 xml_get_tdscdma_btsInfo(WIRELESS_TDSCDMA_INFO * tinfo, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    TDSCDMA_INFO *info = &tinfo->tdscdma;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_BCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_BCC, info->bcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MCC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mcc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MCC, info->mcc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_MNC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->mnc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_MNC, info->mnc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Bts_LAC))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->lac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Bts_LAC, info->lac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)rac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", rac, info->rac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)psc))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->psc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", psc, info->psc);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)arfcn))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->arfcn, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", arfcn, info->arfcn);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)cellId))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->cellId, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cellId, info->cellId);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)autoLac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->autoLac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", autoLac, info->autoLac);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)dac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", dac, info->dac);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)txPower))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->txPower, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", txPower, info->txPower);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)rxPower))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->rxPower, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", rxPower, info->rxPower);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)redirect))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->redirect, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", redirect, info->redirect);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(tinfo->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, tinfo->enable);
            xmlFree(key);
        }

        cur = cur->next;
    }

    return 0;
}

static I32 xml_get_tdscdma_wirelessInfo(WIRELESS_TDSCDMA_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)cap_itvl))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->intvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cap_itvl, conf->intvl);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base)))
            xml_get_tdscdma_btsInfo(conf, doc, cur);
        cur = cur->next;
    }
    return 0;
}

//add eutran
static I32 xml_get_cellInfo(LTE_INFO *info, I32 num,  xmlDocPtr doc, xmlNodePtr cur)
{	
	xmlChar *key;
	cur = cur->xmlChildrenNode;

	while(cur != NULL)
	{
        
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string)))
        {
           
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->enable, (I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, info->enable);
            xmlFree(key);			
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)desc))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->desc, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", desc, info->desc);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Operator))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->Operator, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", Operator, info->Operator);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bandWidth))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->bandWidth, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bandWidth, info->bandWidth);
            xmlFree(key);

        }  
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)IsMeasureEnable))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->IsMeasureEnable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", IsMeasureEnable, info->IsMeasureEnable);
            xmlFree(key);

        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)pci))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->pci, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", pci, info->pci);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)band))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->band, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", band, info->band);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)syncMode))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->syncMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", syncMode, info->syncMode);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)gpsTmDelay))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->gpsTmDelay, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", gpsTmDelay, info->gpsTmDelay);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSaveFs))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->isSaveFs, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSaveFs, info->isSaveFs);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ul_earfcn))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ul_earfcn, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ul_earfcn, info->ul_earfcn);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)dl_earfcn))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dl_earfcn, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", dl_earfcn, info->dl_earfcn);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)plmnid))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->plmnid, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", plmnid, info->plmnid);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)tac))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->tac, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", tac, info->tac);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)neiborcell))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->neiborcell, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", neiborcell, info->neiborcell);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)abnorfreq))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->abnorfreq, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", abnorfreq, info->abnorfreq);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)freqListStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->freqList, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", freqListStr, info->freqList);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ctFreqListStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ctFreqList, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ctFreqListStr, info->ctFreqList);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)minRxLevStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->minRxLev, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", minRxLevStr, info->minRxLev);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)minRxLevOffsetStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->minRxLevOffset, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", minRxLevOffsetStr, info->minRxLevOffset);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)configModeStr))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->configMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", configModeStr, info->configMode);
            xmlFree(key);
        }
        cur = cur->next;
	}
	return 0;
        	
}
static I32 xml_get_lte_bts(WIRELESS_LTE_INFO * conf, xmlDocPtr doc, xmlNodePtr cur)
{	
    cur = cur->xmlChildrenNode;
    xmlChar *key;
    I32 num;
    while( cur != NULL)
    {
        if((!xmlStrcmp(cur->name, (const xmlChar *)Bts_cell)))
        {
            key = xmlGetProp(cur, (const xmlChar*)Cell_Number);
            num = atoi((I8 *) key) - 1 ;
            cli_app_log(CLI_LOG_NOTICE, "%s %d \n", Bts_cell, num);
            if (num < LTE_CELL_NUM )
            {
                xml_get_cellInfo(&conf->lte[num], num, doc, cur);
            }
            xmlFree(key);
        }			
        cur = cur->next;

    }

    return 0;
}


static I32 xml_get_lte_wirelessInfo(WIRELESS_LTE_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while(cur != NULL)
    {
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)tac_cycle))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if (atoi((I8 *) key) < 60 && atoi((I8 *) key) != 0)
                strcpy(conf->tac_cycle, "7200");
            else
                strcpy(conf->tac_cycle, (I8 *) key);
            strcpy(conf->tac_cycle, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", tac_cycle, conf->tac_cycle);
          
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 
        else if((!xmlStrcmp(cur->name, (const xmlChar *)wireless_base)))
        {
            xml_get_lte_bts(conf, doc, cur);

        }
		
        cur = cur->next;
   }
   return 0;
}

static I32 xml_get_wifi_wirelessInfo(WIRELESS_WIFI_INFO * conf, xmlDocPtr doc,
                                xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while(cur != NULL)
    {
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)isSupport))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->isSupported, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", isSupport, conf->isSupported);
            xmlFree(key);
        } 	
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)cap_itvl))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->intvl, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", cap_itvl, conf->intvl);
            xmlFree(key);
        } 	
        cur = cur->next;
   }
   return 0;
}

static I32 xml_get_pa(PA_INFO *conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
    {
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)gain_string))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if (atoi((I8 *) key) < 17)
                strcpy(conf->gain, "17");
            else
                strcpy(conf->gain, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", gain_string, conf->gain);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)dl_att))) 
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            if (atoi((I8 *) key) < 17)
                strcpy(conf->gain, "17");
            else
                strcpy(conf->gain, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", gain_string, conf->gain);
            xmlFree(key);
        }
        cur = cur->next;
    }

    return 0;	

}
static I32 xml_get_paInfo(DEV_CONF * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    key = xmlGetProp(cur, (const xmlChar*)Wireless_type);
    if ( key != NULL)
    {
	    if ((strcmp(Wireless_lte_type, (I8 *)key)) == 0)
	    {
            cur = cur->xmlChildrenNode;
            while(cur != NULL)
            {
                if( !xmlStrcmp(cur->name, (const xmlChar *)pa_name))
                {
                    key = xmlGetProp(cur, (const xmlChar*)pa_id);
                     cli_app_log(CLI_LOG_NOTICE, "%s %d \n", pa_name, atoi((I8 *)key));
                    if ((atoi((I8 *)key) - 1 ) < PA_NUM)
                    {
                       xml_get_pa(&conf->pa[atoi((I8 *)key) - 1], doc, cur);
                    }
                    xmlFree(key);
                }
                cur = cur->next;
            }
        }
        else if ((strcmp(Wireless_gsm_type, (I8 *)key)) == 0)
        {		
            xmlFree(key);
            xml_get_pa(&conf->pa[7], doc, cur);
           
        }
        else if ((strcmp(Wireless_cdma_type, (I8 *)key)) == 0)
        {		
            xmlFree(key);	
            xml_get_pa(&conf->pa[8], doc, cur);
        }
        else if ((strcmp(Wireless_wcdma_type, (I8 *)key)) == 0)
        {		
            xmlFree(key);	
            xml_get_pa(&conf->pa[9], doc, cur);
        }
        else if ((strcmp(Wireless_tdscdma_type, (I8 *)key)) == 0)
        {		
            xmlFree(key);	
            xml_get_pa(&conf->pa[10], doc, cur);
        }
       
    }
    else
    {
        cur = cur->xmlChildrenNode;
        while(cur != NULL)
        {
            if( !xmlStrcmp(cur->name, (const xmlChar *)pa_name))
            {
                key = xmlGetProp(cur, (const xmlChar*)pa_id);
                if ((atoi((I8 *)key) - 1 ) < PA_NUM)
                {
                   xml_get_pa(&conf->pa[atoi((I8 *)key) - 1], doc, cur);
                }
                xmlFree(key);
            }
            cur = cur->next;
        }
    }
    return 0;
}


static I32 xml_get_smsInfo(SMS_INFO * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->enable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->enable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sms_msg))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->msgEnable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->msgEnable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sms_key))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->smsKey, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sms_key, conf->smsKey);
            xmlFree(key);
        }
        cur = cur->next;
    }

    return 0;

}

static I32 xml_get_WorkMode(WORKMODE * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{

        if ((!xmlStrcmp(cur->name, (const xmlChar *)deviceMode))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->workMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", deviceMode, conf->workMode);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workPeriod))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->workPeriod, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", workPeriod, conf->workPeriod);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)powerOffTime))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(conf->powerOffTime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", powerOffTime, conf->powerOffTime);
            xmlFree(key);
        }
        cur = cur->next;
    }

    return 0;

}

static I32 xml_get_cellSnfInfo(SNF_TM_INFO *snfTm , xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while(cur != NULL)
    {
	    if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_hour))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(snfTm->hour, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_hour, snfTm->hour);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_min))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(snfTm->min, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_min, snfTm->min);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_sec))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(snfTm->sec, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_sec, snfTm->sec);
            xmlFree(key);
        } 

        cur = cur->next;

   }
   return 0;    


}




static I32 xml_get_snifferTime(SNF_LTE_INFO * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    cur = cur->xmlChildrenNode;
    xmlChar *key;
    I32 num;
    while( cur != NULL)
    {
        if((!xmlStrcmp(cur->name, (const xmlChar *)Bts_cell)))
        {
            key = xmlGetProp(cur, (const xmlChar*)Cell_Number);
            num = atoi((I8 *) key) - 1 ;
            cli_app_log(CLI_LOG_NOTICE, "%s %d \n", Cell_Number, num);
            if (num < LTE_CELL_NUM )
            {
                xml_get_cellSnfInfo(&conf->snf_tm[num], doc, cur);
            }
            xmlFree(key);
        }			
        cur = cur->next;

    }

    return 0;
}


static I32 xml_get_snifferInfo(DEV_CONF * conf, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    key = xmlGetProp(cur, (const xmlChar*)Wireless_type);
    if ( key != NULL)
    {
	    if ((strcmp(Wireless_lte_type, (I8 *)key)) == 0)
	    {
            cur = cur->xmlChildrenNode;
            xmlFree(key);
            while (cur != NULL) 
	        {
                if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfLte.enable, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->snfLte.enable);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_mode))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfLte.bccMode, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_mode, conf->snfLte.bccMode);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_auto))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfLte.isAuto, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_auto, conf->snfLte.isAuto);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_cycle))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfLte.cycle, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_cycle, conf->snfLte.cycle);
                    xmlFree(key);
                }
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_time))) 
		        {
                    xml_get_snifferTime(&conf->snfLte, doc, cur);
                }
                else if ((!xmlStrcmp(cur->name, (const xmlChar *)"FreqScope"))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfLte.freqScope, (I8 *) key);
                   cli_app_log(CLI_LOG_NOTICE, "%s %s \n", "FreqScope", conf->snfLte.freqScope);
                    xmlFree(key);
                } 
                cur = cur->next;
            }
        }
        else if ((strcmp(Wireless_gsm_type, (I8 *)key)) == 0)
        {		
            cur = cur->xmlChildrenNode;
            xmlFree(key);
            while (cur != NULL) 
	        {
                if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.enable, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->snfGsm.enable);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_mode))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.bccMode, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_mode, conf->snfGsm.bccMode);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_auto))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.isAuto, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_auto, conf->snfGsm.isAuto);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_cycle))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.cycle, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_cycle, conf->snfGsm.cycle);
                    xmlFree(key);
                }
                else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_hour))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.hour, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_hour, conf->snfGsm.hour);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_min))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.min, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_min, conf->snfGsm.min);
                    xmlFree(key);
                } 
		        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_sec))) 
		        {
                    key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                    strcpy(conf->snfGsm.sec, (I8 *) key);
                    cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_sec, conf->snfGsm.sec);
                    xmlFree(key);
                } 
                cur = cur->next;
            }
        }
        
    }
    else
    {
        cur = cur->xmlChildrenNode;
        while (cur != NULL) 
	    {
            if ((!xmlStrcmp(cur->name, (const xmlChar *)en_string))) 
		    {
                key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                strcpy(conf->snfLte.enable, (I8 *) key);
                cli_app_log(CLI_LOG_NOTICE, "%s %s \n", en_string, conf->snfLte.enable);
                xmlFree(key);
            } 
		    else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_mode))) 
		    {
                key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                strcpy(conf->snfLte.bccMode, (I8 *) key);
                cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_mode, conf->snfLte.bccMode);
                xmlFree(key);
            } 
		    else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_auto))) 
		    {
                key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                strcpy(conf->snfLte.isAuto, (I8 *) key);
                cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_auto, conf->snfLte.isAuto);
                xmlFree(key);
            } 
		    else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_cycle))) 
		    {
                key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                strcpy(conf->snfLte.cycle, (I8 *) key);
                cli_app_log(CLI_LOG_NOTICE, "%s %s \n", sniffer_cycle, conf->snfLte.cycle);
                xmlFree(key);
            }
		    else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_time))) 
		    {
                xml_get_snifferTime(&conf->snfLte, doc, cur);
            }
            else if ((!xmlStrcmp(cur->name, (const xmlChar *)"FreqScope"))) 
		    {
                key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
                strcpy(conf->snfLte.freqScope, (I8 *) key);
                cli_app_log(CLI_LOG_NOTICE, "%s %s \n", "FreqScope", conf->snfLte.freqScope);
                xmlFree(key);
            } 
            cur = cur->next;
        }
    }
    return 0;
}

static I32  xml_get_ftp_Info(FTP_INFO *info, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpserverStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpserver, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpserverStr, info->ftpserver);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpuserStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpuser, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpuserStr, info->ftpuser);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftppasswdStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftppasswd, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftppasswdStr, info->ftppasswd);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpportStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpport, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpportStr, info->ftpport);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftptimerStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftptimer, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftptimerStr, info->ftptimer);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpmaxcountStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpmaxcount, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpmaxcountStr, info->ftpmaxcount);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpbsicStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpbsic, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpbsicStr, info->ftpbsic);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcompanyStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcompany, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcompanyStr, info->ftpcompany);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpuptimeStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpuptime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpuptimeStr, info->ftpuptime);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpKeyStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpKey, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpKeyStr, info->ftpKey);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpIVStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpIV, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpIVStr, info->ftpIV);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpDataSourceStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpDataSource, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpDataSourceStr, info->ftpDataSource);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpDataDestStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpDataDest, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpDataDestStr, info->ftpDataDest);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpSingleFileNumStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpSingleFileNum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpSingleFileNumStr, info->ftpSingleFileNum);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpCompressFileNumStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpCompressFileNum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpCompressFileNumStr, info->ftpCompressFileNum);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpenableStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpenable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpenableStr, info->ftpenable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcityNumStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcityNum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcityNumStr, info->ftpcityNum);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpMacenable))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpMacenable, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpMacenable, info->ftpMacenable);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpMactimerStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpMactimer, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpMactimerStr, info->ftpMactimer);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpMacmaxcountStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpMacmaxcount, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpMacmaxcountStr, info->ftpMacmaxcount);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcompanyNameStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcompanyName, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcompanyNameStr, info->ftpcompanyName);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcompanyAddrStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcompanyAddr, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcompanyAddrStr, info->ftpcompanyAddr);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcontactorStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcontactor, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcontactorStr, info->ftpcontactor);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcontactorTelStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcontactorTel, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcontactorTelStr, info->ftpcontactorTel);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpcontactorMailStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpcontactorMail, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpcontactorMailStr, info->ftpcontactorMail);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpplaceNameStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpplaceName, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpplaceNameStr, info->ftpplaceName);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpplaceCodeStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpplaceCode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpplaceCodeStr, info->ftpplaceCode);
            xmlFree(key);
        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpdirStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->ftpdir, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", ftpdirStr, info->ftpdir);
            xmlFree(key);
        }
        cur = cur->next;
    }
    return 0;




}



static I32 xml_get_redirect_cellInfo(UE_REDIRECT *info, I32 num, xmlDocPtr doc, xmlNodePtr cur)
{
    xmlChar *key;
	cur = cur->xmlChildrenNode;

    info->slotId = num + 1;
    cli_app_log(CLI_LOG_NOTICE, "%s %d\n", "slotId", info->enable);
    while(cur != NULL)
    {
        if((!xmlStrcmp(cur->name, (const xmlChar *)enableStr)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->enable = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", enableStr, info->enable);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)ranTypeStr)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->ranType = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", ranTypeStr, info->ranType);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)bandStr)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->band = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", bandStr, info->band);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)freq1Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->freqList[0] = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", freq1Str, info->freqList[0]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)freq2Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->freqList[1] = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", freq2Str, info->freqList[1]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)freq3Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->freqList[2] = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", freq3Str, info->freqList[2]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)freq4Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->freqList[3] = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", freq4Str, info->freqList[3]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)freq5Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            info->freqList[4] = atoi((I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", freq5Str, info->freqList[4]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)imsi1Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            snprintf((char *)info->imsiList[0],16,"%s",(I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s\n", imsi1Str, info->imsiList[0]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)imsi2Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            snprintf((char *)info->imsiList[1],16,"%s",(I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s\n", imsi2Str, info->imsiList[1]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)imsi3Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            snprintf((char *)info->imsiList[2],16,"%s",(I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s\n", imsi3Str, info->imsiList[2]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)imsi4Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            snprintf((char *)info->imsiList[3],16,"%s",(I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s\n", imsi4Str, info->imsiList[3]);
            xmlFree(key);
        }
        else if((!xmlStrcmp(cur->name, (const xmlChar *)imsi5Str)))
        {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            snprintf((char *)info->imsiList[4],16,"%s",(I8 *)key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s\n", imsi5Str, info->imsiList[4]);
            xmlFree(key);
        }
        cur = cur->next;
    }

    return 0;
}

static I32 xml_get_redirect_Info(UE_REDIRECT *info, xmlDocPtr doc, xmlNodePtr cur){
	xmlChar *key;
	cur = cur->xmlChildrenNode;
    I32 num;

	while ( cur != NULL )
	{
		if((!xmlStrcmp(cur->name, (const xmlChar *)cellNumberStr)))
        {
            key = xmlGetProp(cur, (const xmlChar *)cellIdStr);
            num = atoi((I8 *) key) -  1;
            cli_app_log(CLI_LOG_NOTICE, "%s %d\n", cellNumberStr, num);

            if ( num < REDIRECT_LIST_MAX )
            {
                xml_get_redirect_cellInfo(&info[num], num, doc, cur);
            }
            xmlFree(key);
        }

        cur = cur->next;
	}

	return 0;
}

I32 xml_get_devConf(DEV_CONF * info)
{
    xmlDocPtr doc;
    xmlNodePtr cur;
    xmlChar *key;
    bzero(&dev_conf, sizeof(DEV_CONF));
    doc = xmlParseFile(config_file);
    if (doc == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "Document not parsed successfully. \n");
        return -1;
    }
    cur = xmlDocGetRootElement(doc);
    if (cur == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "empty document\n");
        xmlFreeDoc(doc);
        return -1;
    }

    if (xmlStrcmp(cur->name, (const xmlChar *)root_string)) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "document of the wrong type, root node != %s\n",
                    root_string);
        xmlFreeDoc(doc);
        return -1;
    }
    strcpy(info->workMode.workMode, "0");
    strcpy(info->dev.uploadMode, "0");
    strcpy(info->dev.devtype, "4");
    strcpy(info->capLte.isSupported, "1");
    strcpy(info->dev.RFSwitch, "1");
    cur = cur->xmlChildrenNode;
    while (cur != NULL) 
	{
        if ((!xmlStrcmp(cur->name, (const xmlChar *)devNum_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.devNum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devNum_string, info->dev.devNum);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devNumRsv_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.devNumRsv, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devNumRsv_string, info->dev.devNumRsv);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)tempThreshold_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.tempThreshold, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", tempThreshold_string, info->dev.tempThreshold);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devName_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.devName, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devName_string, info->dev.devName);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)type_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.typemodel, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", type_string, info->dev.typemodel);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devType))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.devtype, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devType, info->dev.devtype);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)phone_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.phoneNum, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", phone_string, info->dev.phoneNum);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devAddr_string))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.devAddr, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", devAddr_string, info->dev.devAddr);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)RfSwitch))) 
		{
			if ( strcmp(info->dev.protocol, LOCATION) != 0 )
			{
				memset(info->dev.RFSwitch, 0x0, DEV_INFO_NUM_LEN);
				key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
				strcpy(info->dev.RFSwitch, (I8 *) key);
				cli_app_log(CLI_LOG_NOTICE, "%s %s \n", RfSwitch, info->dev.RFSwitch);
				xmlFree(key);
			}
			cli_app_log(CLI_LOG_NOTICE, "protocol %s  %s \n", dev_conf.dev.protocol, RfSwitch,info->dev.RFSwitch  );
        } 	
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)"UploadMode"))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.uploadMode, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", "UploadMode", info->dev.uploadMode);
            xmlFree(key);
        } 
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)protocol))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.protocol, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", protocol, info->dev.protocol);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)createTime))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.createTime, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", createTime, info->dev.createTime);
            xmlFree(key);
        }
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)siteAreaStr))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(info->dev.siteArea, (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", siteAreaStr, info->dev.siteArea);
            xmlFree(key);
        }  
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)devPos_string)))
            xml_get_posInfo(&info->dev, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)AuthSrv_string)))
            xml_get_srvInfo(&info->auth, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)MngSrv_string)))
            xml_get_srvInfo(&info->mng, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)DataSrv_strig)))
            xml_get_dataSrvInfo(&info->data, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)Wireless_string)))
		{
			
			key = xmlGetProp(cur, (const xmlChar*)Wireless_type);
			if ((strcmp(Wireless_lte_type, (I8 *)key)) == 0 ) 
			{
				xml_get_lte_wirelessInfo(&info->capLte, doc, cur);
			}
			else if ((strcmp(Wireless_gsm_type, (I8 *)key)) == 0 )
			{		
				xml_get_gsm_wirelessInfo(&info->capGsm, doc, cur);
			}
			else if ((strcmp(Wireless_cdma_type, (I8 *)key)) == 0 )
			{			
				xml_get_cdma_wirelessInfo(&info->capCdma, doc, cur);
			}
            else if ( (strcmp(Wireless_wcdma_type, (I8 *)key)) == 0 )
            {
                xml_get_wcdma_wirelessInfo(&info->capWcdma, doc, cur);
            }
            else if ( (strcmp(Wireless_tdscdma_type, (I8 *)key)) == 0 )
            {
                xml_get_tdscdma_wirelessInfo(&info->capTdscdma, doc, cur);
            }
            else if ( (strcmp(Wireless_wifi_type, (I8 *)key)) == 0 )
            {
                xml_get_wifi_wirelessInfo(&info->capWifi, doc, cur);
            }
			xmlFree(key);
		}        
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)pa_string)))
        {
            xml_get_paInfo(info, doc, cur);

        }
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sms_string)))
            xml_get_smsInfo(&info->sms, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)workMode)))
            xml_get_WorkMode(&info->workMode, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)sniffer_string)))
            xml_get_snifferInfo(info, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)storage_string)))
            xml_get_storage_Info(&info->storage, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)restart_string)))
            xml_get_restart_Info(&info->restart, doc, cur);
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)ftpStr)))
            xml_get_ftp_Info(&info->ftp, doc, cur);
		else if ((!xmlStrcmp(cur->name, (const xmlChar *)redirectStr)))
			xml_get_redirect_Info(info->redirect, doc, cur);
		
        cur = cur->next;
    }
    xmlFreeDoc(doc);

	if ( (atoi(dev_conf.auth.disable_auth)) != 0)
	{
		strcpy(dev_conf.mng.port, dev_conf.mng.open_port);
		
		strcpy(dev_conf.data.port, dev_conf.data.open_port);

	}
  
    return 0;
}

//level 1 is root.
static I32 xml_set_nodeInfo(CNODE_INFO * node)
{
    I32 done = 0;
    xmlDocPtr doc;
    xmlNodePtr cur;
	xmlChar *prop;
    doc = xmlParseFile(config_file);
    if (doc == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "Document not parsed successfully. \n");
        return -1;
    }
    cur = xmlDocGetRootElement(doc);
    if (cur == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "empty document\n");
        xmlFreeDoc(doc);
        return -1;
    }

    if (xmlStrcmp(cur->name, (const xmlChar *)root_string)) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "document of the wrong type, root node != %s\n",
                    root_string);
        xmlFreeDoc(doc);
        return -1;
    }
    if (node->lvl2 == NULL) 
	{
        cur = cur->xmlChildrenNode;
        while (cur != NULL) 
		{
            if ((!xmlStrcmp(cur->name, (const xmlChar *)node->name))) 
			{
                xmlNodeSetContent(cur, (const xmlChar *)node->data);
                done = 1;
                goto out;
            }
            cur = cur->next;
        }
    } 
	else if (node->lvl3 == NULL) 
	{

        cur = cur->xmlChildrenNode;
        while (cur != NULL) 
        {
            if ((!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2))) 
            {
                if ( node->type == NULL || ( strcmp( (I8 *)xmlGetProp(cur, (const xmlChar *)Wireless_type), node->type) ==  0 )  )
                {
                    cur = cur->xmlChildrenNode;
                    while (cur != NULL) 
                    {
                        if ((!xmlStrcmp(cur->name, (const xmlChar *)node->name))) 
                        {
                            xmlNodeSetContent(cur, (const xmlChar *)node->data);
                            done = 1;
                            goto out;
                        }
                        cur = cur->next;
                    }
                    goto out;
                }
            }
            cur = cur->next;
        }

    } 
    else if(node->lvl4 == NULL)
    {
        cur = cur->xmlChildrenNode;
        while (cur != NULL) 
        {
            if ((!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2))) 
            {
                if ( node->type == NULL || ( strcmp( (I8 *)xmlGetProp(cur, (const xmlChar *)Wireless_type), node->type) ==  0 )  )
                {
                    cur = cur->xmlChildrenNode;
                    while (cur != NULL) 
                    {
                        if ((!xmlStrcmp(cur->name, (const xmlChar *)node->lvl3))) 
                        {
                            prop = xmlGetProp(cur,(const xmlChar *)pa_id );

                            if (!strncmp(cellNumberStr, node->lvl3, strlen(node->lvl3)))
                            {
                                prop = xmlGetProp(cur, (const xmlChar *)cellIdStr);
                            }
                           
                            if (prop == NULL)
                            {
                                cur = cur->xmlChildrenNode;
                                while (cur != NULL) 
                                {
                                    if ((!xmlStrcmp
                            	         (cur->name, (const xmlChar *)node->name))) 
                                    {
                                        xmlNodeSetContent(cur,
                            	               (const xmlChar *)node->data);
                            	        done = 1;
                            	        goto out;
                                    }
 
                                    cur = cur->next;
                                }
                                goto out;
                            }
                            else 
                            {        

                                if (atoi((I8 *)prop) == node->id)
                                {               	
                                    cur = cur->xmlChildrenNode;
                      
                                    while (cur != NULL) 
                                    {
                                        if ((!xmlStrcmp
                            	             (cur->name, (const xmlChar *)node->name))) 
                                        {
                            	            xmlNodeSetContent(cur,
                            	                          (const xmlChar *)node->data);
                                            done = 1;
                                            goto out;
                                        }
                                        cur = cur->next;
                                    }
                                }
                                xmlFree(prop);
                          
                            }
                        }
                        cur = cur->next;
                    }
                    goto out;
                }
            }
            cur = cur->next;
        }
    }
	else
	{
      
        cur = cur->xmlChildrenNode;
        while (cur != NULL) 
        {		
			
           if (((strcmp(node->lvl2, sniffer_string) == 0) && (!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2)))|| (((!xmlStrcmp(cur->name, (const xmlChar *)node->lvl2)) && (strcmp((I8 *)xmlGetProp(cur, (const xmlChar*)Wireless_type), Wireless_lte_type) == 0)))  ) 
           {
           
                cur = cur->xmlChildrenNode;
                while (cur != NULL) 
                {
                    if ((!xmlStrcmp(cur->name, (const xmlChar *)node->lvl3))) 
                    {
                        cur = cur->xmlChildrenNode;
                        while (cur != NULL) 
                        {
                            if ((!xmlStrcmp
                                 (cur->name, (const xmlChar *)node->lvl4)) && (atoi((I8 *)xmlGetProp(cur, (const xmlChar*)Cell_Number)) == node->id)) 
                            {
								
                                cur = cur->xmlChildrenNode;
                                while (cur != NULL) 
                                {
                                    if ((!xmlStrcmp
                                        (cur->name, (const xmlChar *)node->name))) 
                                    {
                            		    xmlNodeSetContent(cur,
                            	                      (const xmlChar *)node->data);
                            		    done = 1;
                            		    goto out;
                                     }
                                     cur = cur->next;
                                 }
                                 goto out;
                           }
                           cur = cur->next;
                        }
                        goto out;
                    }
                    cur = cur->next;
                }
                goto out;
            }
            cur = cur->next;
        }		
	}
 out:
    if (done != 1) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "Update Config: can not find content %s\n", 
					node->name);
        xmlFreeDoc(doc);
        return -1;
    }

    xmlSaveFormatFile(config_file, doc, 0);
    xmlFreeDoc(doc);
    return 0;
}

void xml_cp_unchang_config()
{
    I8 unchang_config[LTE_CELL_NUM][DEV_INFO_NUM_LEN];
    memset(unchang_config, 0, sizeof(unchang_config));
    xmlDocPtr doc;
    xmlNodePtr cur;
    xmlChar *key;
    doc = xmlParseFile(unchang_cfg_file);
    if (doc == NULL) 
	{
        cli_app_log(CLI_LOG_INFO, "%s Document not parsed successfully. \n", unchang_cfg_file);
        return ;
    }
    cur = xmlDocGetRootElement(doc);
    if (cur == NULL) 
	{
        cli_app_log(CLI_LOG_CRITICAL, "empty document\n");
        xmlFreeDoc(doc);
        return ;
    }

    if (xmlStrcmp(cur->name, (const xmlChar *)root_string)) 
	{
        cli_app_log(CLI_LOG_CRITICAL,
                    "document of the wrong type, root node != %s\n",
                    root_string);
        xmlFreeDoc(doc);
        return ;
    }
  
    cur = cur->xmlChildrenNode;     
    while(cur != NULL)
    {

        if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu1exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[0], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu1exist, unchang_config[0]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu2exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[1], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu2exist, unchang_config[1]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu3exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[2], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu3exist, unchang_config[2]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu4exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[3], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu4exist, unchang_config[3]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu5exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[4], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu5exist, unchang_config[4]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu6exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[5], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu6exist, unchang_config[5]);
            xmlFree(key);
        } 
        else if ((!xmlStrcmp(cur->name, (const xmlChar *)bbu7exist))) 
		{
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            strcpy(unchang_config[6], (I8 *) key);
            cli_app_log(CLI_LOG_NOTICE, "%s %s \n", bbu7exist, unchang_config[6]);
            xmlFree(key);
        }        
        cur = cur->next;
    }
    xmlFreeDoc(doc);  
    system(rm_unchang_cfg_file);
    CNODE_INFO node;
    bzero(&node, sizeof(CNODE_INFO));
    
    node.lvl3 = wireless_base;

    node.type = Wireless_lte_type;
    node.lvl2 = Wireless_string;
    node.lvl4 = Bts_cell;
    int i = 0;
    for( i = 0; i < LTE_CELL_NUM; i++ )
    {             
        if (unchang_config[i][0] != 0 && strcmp(dev_conf.capLte.lte[i].enable, unchang_config[i]) != 0) 
        {
            node.id = (i + 1) ;
            bzero(dev_conf.capLte.lte[i].enable, DEV_INFO_NUM_LEN);
            strcpy(dev_conf.capLte.lte[i].enable, unchang_config[i]);
            node.name = en_string;
            node.data = dev_conf.capLte.lte[i].enable;
            cli_app_log(CLI_LOG_NOTICE, "slotId[%d] %s %s \n", node.id, en_string, dev_conf.capLte.lte[i].enable);            
            xml_set_nodeInfo(&node);
        }
    }
    return;
}

I32 xml_handle_conf(I8 *buf_tmp, I32 module)
{

    DEV_INFO *dInfo;
    SRV_INFO *sInfo;
    LTE_INFO *gInfo, *tInfo;
    WIRELESS_LTE_INFO *wInfo;
    WORKMODE *wkMode;
    I32 tmp1 = IF_APP_OK;
    I32 pa[8] = {0};

	GSM_INFO *g1Info, *t1Info;
    CDMA_INFO *cInfo, *cInfo1;
    WIRELESS_GSM_INFO *w1Info;
    WIRELESS_CDMA_INFO *wcdma;
    WIRELESS_WCDMA_INFO *wWcdma;
    WIRELESS_TDSCDMA_INFO *wTdscdma;
    I8 *lvl3;


    PA_INFO *pInfo;
    SMS_INFO *smsInfo;
    SNF_INFO *snfInfo;
    SNF_LTE_INFO *snfLteInfo;
    STORAGE_INFO *stInfo;
    FTP_INFO *ftpInfo;
    UE_REDIRECT *redirectInfo;
    CNODE_INFO node;
    RESTART_INFO *restartInfo;
    I32 ret = REQUEST_UPDATA_NONE;
    I32 tmp = IF_APP_OK;

    bzero(&node, sizeof(CNODE_INFO));
    xml_config_overwirte(CONFIG_MODE_BACKUP);
  
 
    switch (module) 
	{
        case IF_APP_ERROR:
            return ret;

        case IF_APP_FTP_REPORT_SWITCH:
            ftpInfo = (FTP_INFO *)buf_tmp;
           if (ftpInfo->ftpenable[0] != 0
                && strcmp(dev_conf.ftp.ftpenable, ftpInfo->ftpenable) != 0) 
			{
                bzero(dev_conf.ftp.ftpenable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.ftp.ftpenable, ftpInfo->ftpenable);

                node.lvl2 = ftpStr;
                node.name = ftpenableStr;
                node.data = ftpInfo->ftpenable;
                xml_set_nodeInfo(&node);
            }
            break;            

        case IF_APP_FTP_INFO:
            ftpInfo = (FTP_INFO *)buf_tmp;
           if (ftpInfo->ftpserver[0] != 0
                && strcmp(dev_conf.ftp.ftpserver, ftpInfo->ftpserver) != 0) 
			{
                bzero(dev_conf.ftp.ftpserver, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.ftp.ftpserver, ftpInfo->ftpserver);

                node.lvl2 = ftpStr;
                node.name = ftpserverStr;
                node.data = ftpInfo->ftpserver;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftpuser[0] != 0
                && strcmp(dev_conf.ftp.ftpuser, ftpInfo->ftpuser) != 0) 
			{
                bzero(dev_conf.ftp.ftpuser, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.ftp.ftpuser, ftpInfo->ftpuser);

                node.lvl2 = ftpStr;
                node.name = ftpuserStr;
                node.data = ftpInfo->ftpuser;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftppasswd[0] != 0
                && strcmp(dev_conf.ftp.ftppasswd, ftpInfo->ftppasswd) != 0) 
			{
                bzero(dev_conf.ftp.ftppasswd, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.ftp.ftppasswd, ftpInfo->ftppasswd);

                node.lvl2 = ftpStr;
                node.name = ftppasswdStr;
                node.data = ftpInfo->ftppasswd;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftpport[0] != 0
                && strcmp(dev_conf.ftp.ftpport, ftpInfo->ftpport) != 0) 
			{
                bzero(dev_conf.ftp.ftpport, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.ftp.ftpport, ftpInfo->ftpport);

                node.lvl2 = ftpStr;
                node.name = ftpportStr;
                node.data = ftpInfo->ftpport;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftptimer[0] != 0
                && strcmp(dev_conf.ftp.ftptimer, ftpInfo->ftptimer) != 0) 
			{
                bzero(dev_conf.ftp.ftptimer, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.ftp.ftptimer, ftpInfo->ftptimer);

                node.lvl2 = ftpStr;
                node.name = ftptimerStr;
                node.data = ftpInfo->ftptimer;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftpmaxcount[0] != 0
                && strcmp(dev_conf.ftp.ftpmaxcount, ftpInfo->ftpmaxcount) != 0) 
			{
                bzero(dev_conf.ftp.ftpmaxcount, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.ftp.ftpmaxcount, ftpInfo->ftpmaxcount);

                node.lvl2 = ftpStr;
                node.name = ftpmaxcountStr;
                node.data = ftpInfo->ftpmaxcount;
                xml_set_nodeInfo(&node);
            }
           if (ftpInfo->ftpcityNum[0] != 0
                && strcmp(dev_conf.ftp.ftpcityNum, ftpInfo->ftpcityNum) != 0) 
			{
                bzero(dev_conf.ftp.ftpcityNum, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.ftp.ftpcityNum, ftpInfo->ftpcityNum);

                node.lvl2 = ftpStr;
                node.name = ftpcityNumStr;
                node.data = ftpInfo->ftpcityNum;
                xml_set_nodeInfo(&node);
            }            
           if (ftpInfo->ftpbsic[0] != 0
                && strcmp(dev_conf.ftp.ftpbsic, ftpInfo->ftpbsic) != 0) 
			{
                bzero(dev_conf.ftp.ftpbsic, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.ftp.ftpbsic, ftpInfo->ftpbsic);

                node.lvl2 = ftpStr;
                node.name = ftpbsicStr;
                node.data = ftpInfo->ftpbsic;
                xml_set_nodeInfo(&node);
            }      
            break;

        case IF_APP_INFO_CHNG:
            dInfo = (DEV_INFO *)buf_tmp;
            if (dInfo->devNum[0] != 0
                && strcmp(dev_conf.dev.devNum, dInfo->devNum) != 0) 
			{
                bzero(dev_conf.dev.devNum, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.devNum, dInfo->devNum);

                node.name = devNum_string;
                node.data = dInfo->devNum;
                xml_set_nodeInfo(&node);
            }
           if (dInfo->siteArea[0] != 0
                && strcmp(dev_conf.dev.siteArea, dInfo->siteArea) != 0) 
			{
                bzero(dev_conf.dev.siteArea, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.dev.siteArea, dInfo->siteArea);

                node.name = siteAreaStr;
                node.data = dInfo->siteArea;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->devName[0] != 0
                && strcmp(dev_conf.dev.devName, dInfo->devName) != 0) 
			{
                bzero(dev_conf.dev.devName, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.devName, dInfo->devName);

                node.name = devName_string;
                node.data = dInfo->devName;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->typemodel[0] != 0
                && strcmp(dev_conf.dev.typemodel, dInfo->typemodel) != 0) 
			{
                bzero(dev_conf.dev.typemodel, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.typemodel, dInfo->typemodel);
                node.name = type_string;
                node.data = dInfo->typemodel;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->phoneNum[0] != 0
                && strcmp(dev_conf.dev.phoneNum, dInfo->phoneNum) != 0) 
			{
                bzero(dev_conf.dev.phoneNum, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.dev.phoneNum, dInfo->phoneNum);

                node.name = phone_string;
                node.data = dInfo->phoneNum;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->devAddr[0] != 0
                && strcmp(dev_conf.dev.devAddr, dInfo->devAddr) != 0) 
			{
                bzero(dev_conf.dev.devAddr, DEV_INFO_ADD_LEN);
                strcpy(dev_conf.dev.devAddr, dInfo->devAddr);
                node.name = devAddr_string;
                node.data = dInfo->devAddr;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->pos_lo[0] != 0
                && strcmp(dev_conf.dev.pos_lo, dInfo->pos_lo) != 0) 
			{
                bzero(dev_conf.dev.pos_lo, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.pos_lo, dInfo->pos_lo);

                node.lvl2 = devPos_string;
                node.name = devPos_lo;
                node.data = dInfo->pos_lo;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->pos_la[0] != 0
                && strcmp(dev_conf.dev.pos_la, dInfo->pos_la) != 0) 
			{
                bzero(dev_conf.dev.pos_la, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.pos_la, dInfo->pos_la);

                node.lvl2 = devPos_string;
                node.name = devPos_la;
                node.data = dInfo->pos_la;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->pos_he[0] != 0
                && strcmp(dev_conf.dev.pos_he, dInfo->pos_he) != 0) 
			{
                bzero(dev_conf.dev.pos_he, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.dev.pos_he, dInfo->pos_he);

                node.lvl2 = devPos_string;
                node.name = devPos_he;
                node.data = dInfo->pos_he;
                xml_set_nodeInfo(&node);
            }
            if (dInfo->gpsEnable[0] != 0
                && strcmp(dev_conf.dev.gpsEnable, dInfo->gpsEnable) != 0) 
			{
                bzero(dev_conf.dev.gpsEnable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.dev.gpsEnable, dInfo->gpsEnable);

                node.lvl2 = devPos_string;
                node.name = en_string;
                node.data = dInfo->gpsEnable;
                xml_set_nodeInfo(&node);
            }

            break;

        case IF_APP_AUTH_H_CHNG:
            sInfo = (SRV_INFO *)buf_tmp;
#if 0
            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.auth.addr, sInfo->addr) != 0) {
                bzero(dev_conf.auth.addr, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.auth.addr, sInfo->addr);

                node.lvl2 = AuthSrv_string;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_AUTH;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.auth.port, sInfo->port) != 0) {
                bzero(dev_conf.auth.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.auth.port, sInfo->port);

                node.lvl2 = AuthSrv_string;
                node.name = srv_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_AUTH;
            }
#endif
            if (sInfo->itvl[0] != 0
                && strcmp(dev_conf.auth.itvl, sInfo->itvl) != 0) 
			{
                bzero(dev_conf.auth.itvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.auth.itvl, sInfo->itvl);

                node.lvl2 = AuthSrv_string;
                node.name = heart_beat;
                node.data = sInfo->itvl;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_AUTH_H;
            }
            break;

        case IF_APP_MNG_H_CHNG:
            sInfo = (SRV_INFO *)buf_tmp;
#if 0
            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.mng.addr, sInfo->addr) != 0) {
                bzero(dev_conf.mng.addr, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.mng.addr, sInfo->addr);

                node.lvl2 = MngSrv_string;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_MNG;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.mng.port, sInfo->port) != 0) {
                bzero(dev_conf.mng.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.port, sInfo->port);

                node.lvl2 = MngSrv_string;
                node.name = srv_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_MNG;
            }
#endif
            if (sInfo->itvl[0] != 0
                && strcmp(dev_conf.mng.itvl, sInfo->itvl) != 0) 
			{
                bzero(dev_conf.mng.itvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.itvl, sInfo->itvl);

                node.lvl2 = MngSrv_string;
                node.name = interval;
                node.data = sInfo->itvl;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_MNG_I;
            }
            if (sInfo->hb[0] != 0 && strcmp(dev_conf.mng.hb, sInfo->hb) != 0) 
			{
                bzero(dev_conf.mng.hb, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.hb, sInfo->hb);

                node.lvl2 = MngSrv_string;
                node.name = heart_beat;
                node.data = sInfo->hb;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_MNG_H;
            }
            break;

        case IF_APP_DATA_H_CHNG:
            sInfo = (SRV_INFO *)buf_tmp;
#if 0
            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.data.addr, sInfo->addr) != 0) {
                bzero(dev_conf.data.addr, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.addr, sInfo->addr);

                node.lvl2 = DataSrv_strig;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_DATA;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.data.port, sInfo->port) != 0) {
                bzero(dev_conf.data.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.port, sInfo->port);

                node.lvl2 = DataSrv_strig;
                node.name = srv_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_DATA;
            }
#endif
            if (sInfo->itvl[0] != 0
                && strcmp(dev_conf.data.itvl, sInfo->itvl) != 0) 
			{
                bzero(dev_conf.data.itvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.itvl, sInfo->itvl);

                node.lvl2 = DataSrv_strig;
                node.name = interval;
                node.data = sInfo->itvl;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_DATA_I;
            }
            if (sInfo->hb[0] != 0 && strcmp(dev_conf.data.hb, sInfo->hb) != 0) 
			{
                bzero(dev_conf.data.hb, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.hb, sInfo->hb);
                node.lvl2 = DataSrv_strig;
                node.name = heart_beat;
                node.data = sInfo->hb;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_DATA_H;
            }
            break;

        case IF_APP_SRV_CHANGE:
            sInfo = (SRV_INFO *)buf_tmp;

            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.auth.addr, sInfo->addr) != 0) 
			{
                bzero(dev_conf.auth.addr, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.auth.addr, sInfo->addr);

                node.lvl2 = AuthSrv_string;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.auth.port, sInfo->port) != 0) 
			{
                bzero(dev_conf.auth.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.auth.port, sInfo->port);

                node.lvl2 = AuthSrv_string;
                node.name = srv_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }

            sInfo = (SRV_INFO *)(buf_tmp + sizeof(SRV_INFO));

            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.mng.addr, sInfo->addr) != 0) 
			{
                bzero(dev_conf.mng.addr, DEV_INFO_PAR_LEN);
                strcpy(dev_conf.mng.addr, sInfo->addr);

                node.lvl2 = MngSrv_string;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.mng.port, sInfo->port) != 0) 
			{
                bzero(dev_conf.mng.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.port, sInfo->port);

                node.lvl2 = MngSrv_string;
                if (atoi(dev_conf.auth.disable_auth) == 0)
                    node.name = srv_port;
                else
                    node.name = open_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }
            sInfo = (SRV_INFO *)(buf_tmp + 2 * sizeof(SRV_INFO));

            if (sInfo->addr[0] != 0
                && strcmp(dev_conf.data.addr, sInfo->addr) != 0) 
			{
                bzero(dev_conf.data.addr, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.addr, sInfo->addr);

                node.lvl2 = DataSrv_strig;
                node.name = srv_addr;
                node.data = sInfo->addr;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }
            if (sInfo->port[0] != 0
                && strcmp(dev_conf.data.port, sInfo->port) != 0) 
			{
                bzero(dev_conf.data.port, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.port, sInfo->port);

                node.lvl2 = DataSrv_strig;
                if (atoi(dev_conf.auth.disable_auth) == 0)
                    node.name = srv_port;
                else
                    node.name = open_port;
                node.data = sInfo->port;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_SRV;
            }
            break;

        case IF_APP_RUNTIME_SWITCH:
            sInfo = (SRV_INFO *)buf_tmp;

            if (sInfo->enable[0] != 0
                && strcmp(dev_conf.mng.enable, sInfo->enable) != 0) 
			{
                bzero(dev_conf.mng.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.enable, sInfo->enable);

                node.lvl2 = MngSrv_string;
                node.name = en_string;
                node.data = sInfo->enable;
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_MNG_EN;
            }
            break;

        case IF_APP_CHG_ALL_CELL:
            break;

        case IF_APP_LTE1_CHNG:		
        case IF_APP_LTE2_CHNG:			
        case IF_APP_LTE3_CHNG:
        case IF_APP_LTE4_CHNG:
        case IF_APP_LTE5_CHNG:
        case IF_APP_LTE6_CHNG:
        case IF_APP_LTE7_CHNG:
            tmp = module - IF_APP_LTE1_CHNG;
			wInfo = (WIRELESS_LTE_INFO *)buf_tmp;
            gInfo = &wInfo->lte[tmp];
            tInfo = &dev_conf.capLte.lte[tmp];
            node.lvl3 = wireless_base;
            node.id = ++tmp ;
		    node.type = Wireless_lte_type;
            node.lvl2 = Wireless_string;
            node.lvl4 = Bts_cell;
                 
            if (gInfo->desc[0] != 0 && strcmp(tInfo->desc, gInfo->desc) != 0) 
            {
                bzero(tInfo->desc, DEV_INFO_NUM_LEN);
                strcpy(tInfo->desc, gInfo->desc);
                node.name = desc;
                node.data = tInfo->desc;
                xml_set_nodeInfo(&node);
            }
            
            if (gInfo->bandWidth[0] != 0 && strcmp(tInfo->bandWidth, gInfo->bandWidth) != 0) 
            {
              
                bzero(tInfo->bandWidth, DEV_INFO_NUM_LEN);
                strcpy(tInfo->bandWidth, gInfo->bandWidth);
                node.name = bandWidth;
                node.data = tInfo->bandWidth;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
            }  
            if (gInfo->band[0] != 0 && strcmp(tInfo->band, gInfo->band) != 0) 
            {
                bzero(tInfo->band, DEV_INFO_NUM_LEN);
                strcpy(tInfo->band, gInfo->band);
                node.name = band;
                node.data = tInfo->band;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
            }	
            if (gInfo->plmnid[0] != 0 && strcmp(tInfo->plmnid, gInfo->plmnid) != 0) 
			{
                bzero(tInfo->plmnid, DEV_INFO_PAR_LEN);
                strcpy(tInfo->plmnid, gInfo->plmnid);
                node.name = plmnid;
                node.data = tInfo->plmnid;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                ret = REQUEST_EUTRAN_UPDATA_CELL;
            }
            if (gInfo->tac[0] != 0 && strcmp(tInfo->tac, gInfo->tac) != 0) 
			{
                bzero(tInfo->tac, DEV_INFO_NUM_LEN);
                strcpy(tInfo->tac, gInfo->tac);
                node.name = tac;
                node.data = tInfo->tac;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                ret = REQUEST_EUTRAN_UPDATA_CELL;
            }
            if (gInfo->ul_earfcn[0] != 0 && strcmp(tInfo->ul_earfcn, gInfo->ul_earfcn) != 0) 
		    {
			
                bzero(tInfo->ul_earfcn, DEV_INFO_NUM_LEN);
                strcpy(tInfo->ul_earfcn, gInfo->ul_earfcn);
                node.name = ul_earfcn;
                node.data = tInfo->ul_earfcn;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);                      
            }
            if (gInfo->dl_earfcn[0] != 0 && strcmp(tInfo->dl_earfcn, gInfo->dl_earfcn) != 0) 
		    {			
                bzero(tInfo->dl_earfcn, DEV_INFO_NUM_LEN);
                strcpy(tInfo->dl_earfcn, gInfo->dl_earfcn);
                node.name = dl_earfcn;
                node.data = tInfo->dl_earfcn;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);                      
            }
            if (gInfo->pci[0] != 0 && strcmp(tInfo->pci, gInfo->pci) != 0) 
			{
			
                bzero(tInfo->pci, DEV_INFO_NUM_LEN);
                strcpy(tInfo->pci, gInfo->pci);
                node.name = pci;
                node.data = tInfo->pci;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
            }
            if (gInfo->neiborcell[0] != 0 && strcmp(tInfo->neiborcell, gInfo->neiborcell) != 0) 
			{
                bzero(tInfo->neiborcell, DEV_INFO_PAR_LEN);
                strcpy(tInfo->neiborcell, gInfo->neiborcell);
                node.name = neiborcell;
                node.data = tInfo->neiborcell;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT;
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
            }
            if (gInfo->abnorfreq[0] != 0 && strcmp(tInfo->abnorfreq, gInfo->abnorfreq) != 0) 
			{
                bzero(tInfo->abnorfreq, DEV_INFO_PAR_LEN);
                strcpy(tInfo->abnorfreq, gInfo->abnorfreq);
                node.name = abnorfreq;
                node.data = tInfo->abnorfreq;
                xml_set_nodeInfo(&node);
                ret = REQUEST_EUTRAN_BBU_REBOOT; 
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
            }	
			if (gInfo->freqList[0] != 0 && strcmp(tInfo->freqList, gInfo->freqList) != 0) 
			{
                bzero(tInfo->freqList, DEV_INFO_PAR_LEN);
                strcpy(tInfo->freqList, gInfo->freqList);
                node.name = freqListStr;
                node.data = tInfo->freqList;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                ret = REQUEST_EUTRAN_UPDATA_CELL;
            }

            ret = REQUEST_BBU1_INIT_CONFIG + tmp - 1;
            break;

        case IF_APP_GPS_DELAY:    
            wInfo = (WIRELESS_LTE_INFO *)buf_tmp;   
			for (tmp = 0; tmp < 7; tmp++)
            {
               gInfo = &wInfo->lte[tmp];
               tInfo = &dev_conf.capLte.lte[tmp];
               node.lvl3 = wireless_base;
               node.id = (tmp + 1) ;
		       node.type = Wireless_lte_type;		
               node.lvl2 = Wireless_string;
               node.lvl4 = Bts_cell;
               ret = REQUEST_UPDATA_NONE;              
               if (gInfo->gpsTmDelay[0] != 0 && strcmp(tInfo->gpsTmDelay, gInfo->gpsTmDelay) != 0) 
               {
                    bzero(tInfo->gpsTmDelay, DEV_INFO_NUM_LEN);
                    strcpy(tInfo->gpsTmDelay, gInfo->gpsTmDelay);
                    node.name = gpsTmDelay;
                    node.data = tInfo->gpsTmDelay;
                    xml_set_nodeInfo(&node);
                    ret = REQUEST_UPDATA_REBOOT;
                    cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
               }
               if (gInfo->IsMeasureEnable[0] != 0 && strcmp(tInfo->IsMeasureEnable, gInfo->IsMeasureEnable) != 0) 
               {
                    bzero(tInfo->IsMeasureEnable, DEV_INFO_NUM_LEN);
                    strcpy(tInfo->IsMeasureEnable, gInfo->IsMeasureEnable);
                    node.name = IsMeasureEnable;
                    node.data = tInfo->IsMeasureEnable;
                    xml_set_nodeInfo(&node);
                    ret = REQUEST_UPDATA_REBOOT;
                    cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
               }
               if (gInfo->bandWidth[0] != 0 && strcmp(tInfo->bandWidth, gInfo->bandWidth) != 0) 
               {
                    bzero(tInfo->bandWidth, DEV_INFO_NUM_LEN);
                    strcpy(tInfo->bandWidth, gInfo->bandWidth);
                    node.name = bandWidth;
                    node.data = tInfo->bandWidth;
                    xml_set_nodeInfo(&node);
                    ret = REQUEST_UPDATA_REBOOT;
                    cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
               }
               if (gInfo->syncMode[0] != 0 && strcmp(tInfo->syncMode, gInfo->syncMode) != 0) 
               {
                    bzero(tInfo->syncMode, DEV_INFO_NUM_LEN);
                    strcpy(tInfo->syncMode, gInfo->syncMode);
                    node.name = syncMode;
                    node.data = tInfo->syncMode;
                    xml_set_nodeInfo(&node);
                    ret = REQUEST_UPDATA_REBOOT;
                    cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
               }
               if (gInfo->isSaveFs[0] != 0 && strcmp(tInfo->isSaveFs, gInfo->isSaveFs) != 0) 
               {
                    bzero(tInfo->isSaveFs, DEV_INFO_NUM_LEN);
                    strcpy(tInfo->isSaveFs, gInfo->isSaveFs);
                    node.name = isSaveFs;
                    node.data = tInfo->isSaveFs;
                    xml_set_nodeInfo(&node);
                    ret = REQUEST_UPDATA_REBOOT;
                    cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
               }
               if (gInfo->minRxLev[0] != 0 && strcmp(tInfo->minRxLev, gInfo->minRxLev) != 0) 
               {
                   bzero(tInfo->minRxLev, DEV_INFO_NUM_LEN);
                   strcpy(tInfo->minRxLev, gInfo->minRxLev);
                   node.name = minRxLevStr;
                   node.data = tInfo->minRxLev;
                   xml_set_nodeInfo(&node);
                   cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                   ret = REQUEST_UPDATA_REBOOT;
               }
               if (gInfo->minRxLevOffset[0] != 0 && strcmp(tInfo->minRxLevOffset, gInfo->minRxLevOffset) != 0) 
               {
                   bzero(tInfo->minRxLevOffset, DEV_INFO_NUM_LEN);
                   strcpy(tInfo->minRxLevOffset, gInfo->minRxLevOffset);
                   node.name = minRxLevOffsetStr;
                   node.data = tInfo->minRxLevOffset;
                   xml_set_nodeInfo(&node);
                   cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                   ret = REQUEST_UPDATA_REBOOT;
               }
               if (gInfo->configMode[0] != 0 && strcmp(tInfo->configMode, gInfo->configMode) != 0) 
               {
                   bzero(tInfo->configMode, DEV_INFO_NUM_LEN);
                   strcpy(tInfo->configMode, gInfo->configMode);
                   node.name = configModeStr;
                   node.data = tInfo->configMode;
                   xml_set_nodeInfo(&node);
                   cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                   ret = REQUEST_UPDATA_REBOOT;
               }
               if (ret == REQUEST_UPDATA_REBOOT)
               {
                   cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                   cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_BBU1_INIT_CONFIG + tmp;
                   cmdList.commandNum++;
               }
           }
           break;
    

        case IF_APP_LTE_SNIF_PAR:
            snfLteInfo = (SNF_LTE_INFO *)buf_tmp;
            node.type = Wireless_lte_type;
            if (snfLteInfo->isAuto[0] != 0
                && strcmp(dev_conf.snfLte.isAuto, snfLteInfo->isAuto) != 0) 
			{
                bzero(dev_conf.snfLte.isAuto, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfLte.isAuto, snfLteInfo->isAuto);
                node.lvl2 = sniffer_string;
                node.name = sniffer_auto;
                node.data = snfLteInfo->isAuto;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name,  node.data);
            }

            if (snfLteInfo->freqScope[0] != 0
                && strcmp(dev_conf.snfLte.freqScope, snfLteInfo->freqScope) != 0) 
			{
                bzero(dev_conf.snfLte.freqScope, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfLte.freqScope, snfLteInfo->freqScope);
                node.lvl2 = sniffer_string;
                node.name = "FreqScope";
                node.data = snfLteInfo->freqScope;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name,  node.data);
            }

            if (snfLteInfo->bccMode[0] != 0
                && strcmp(dev_conf.snfLte.bccMode, snfLteInfo->bccMode) != 0) 
			{
                bzero(dev_conf.snfLte.bccMode, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfLte.bccMode, snfLteInfo->bccMode);
                node.lvl2 = sniffer_string;
                node.name = sniffer_mode;
                node.data = snfLteInfo->bccMode;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name,  node.data);
            }
            if (snfLteInfo->cycle[0] != 0
                && strcmp(dev_conf.snfLte.cycle, snfLteInfo->cycle) != 0) 
			{
                bzero(dev_conf.snfLte.cycle, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfLte.cycle, snfLteInfo->cycle);
                node.lvl2 = sniffer_string;
                node.name = sniffer_cycle;
                node.data = snfLteInfo->cycle;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name,  node.data);
            }

            node.lvl3 = sniffer_time;
            node.lvl4 = Bts_cell;
            
            for (; tmp < LTE_CELL_NUM; tmp++)
            {
                 tmp1 = 0;
                 node.id = (tmp + 1);
                 if (snfLteInfo->snf_tm[tmp].hour[0] != 0
                     && strcmp(dev_conf.snfLte.snf_tm[tmp].hour, snfLteInfo->snf_tm[tmp].hour) != 0) 
			     {
                     bzero(dev_conf.snfLte.snf_tm[tmp].hour, DEV_INFO_NUM_LEN);
                     strcpy(dev_conf.snfLte.snf_tm[tmp].hour, snfLteInfo->snf_tm[tmp].hour);
                     node.lvl2 = sniffer_string;
 
                     node.name = sniffer_hour ; 
                     node.data = snfLteInfo->snf_tm[tmp].hour; 

                     xml_set_nodeInfo(&node);
                     tmp1 = 1;
                     ret = REQUEST_EUTRAN_AUTO_SNIFFER_PAR;
                 }
                 if (snfLteInfo->snf_tm[tmp].min[0] != 0
                     && strcmp(dev_conf.snfLte.snf_tm[tmp].min, snfLteInfo->snf_tm[tmp].min) != 0) 
		         { 
                     bzero(dev_conf.snfLte.snf_tm[tmp].min, DEV_INFO_NUM_LEN);
                     strcpy(dev_conf.snfLte.snf_tm[tmp].min, snfLteInfo->snf_tm[tmp].min);
                     node.lvl2 = sniffer_string;
                     node.name = sniffer_min;
                     node.data = snfLteInfo->snf_tm[tmp].min;
                     xml_set_nodeInfo(&node);
                     tmp1 = 1;
                     ret = REQUEST_EUTRAN_AUTO_SNIFFER_PAR;
                 }
                 if (snfLteInfo->snf_tm[tmp].sec[0] != 0
                     && strcmp(dev_conf.snfLte.snf_tm[tmp].sec, snfLteInfo->snf_tm[tmp].sec) != 0) 
			     {
                      bzero(dev_conf.snfLte.snf_tm[tmp].sec, DEV_INFO_NUM_LEN);
                      strcpy(dev_conf.snfLte.snf_tm[tmp].sec, snfLteInfo->snf_tm[tmp].sec);
                      node.lvl2 = sniffer_string;
                      node.name = sniffer_sec;
                      node.data = snfLteInfo->snf_tm[tmp].sec;
                      xml_set_nodeInfo(&node);
                 }
            }
         
            break;

        case IF_APP_LTE_CAP_INTERVAL:
            break;

        case IF_APP_LTE_SNIFFER_SWITCH:
            snfLteInfo = (SNF_LTE_INFO *)buf_tmp;
            node.type = Wireless_lte_type;
            if (snfLteInfo->enable[0] != 0
                && strcmp(dev_conf.snfLte.enable, snfLteInfo->enable) != 0) 
			{
                bzero(dev_conf.snfLte.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfLte.enable, snfLteInfo->enable);
                node.lvl2 = sniffer_string;
                node.name = en_string;
                node.data = snfLteInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set  %s %s %s \n", node.type, node.name,  node.data);
                ret = REQUEST_EUTRAN_AUTO_SNIFFER_PAR;
            }
			
            break;
        case IF_APP_UPDATA_TAC_CYCLE:
            wInfo = (WIRELESS_LTE_INFO *)buf_tmp;
            node.type = Wireless_lte_type;
            if (wInfo->tac_cycle[0] != 0
                && strcmp(dev_conf.capLte.tac_cycle, wInfo->tac_cycle) != 0) 
			{
                bzero(dev_conf.capLte.tac_cycle, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.capLte.tac_cycle, wInfo->tac_cycle);

                node.lvl2 = Wireless_string;
                node.name = tac_cycle;
                node.data = wInfo->tac_cycle;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set  %s %s %s \n", node.type, node.name,  node.data);
                ret = REQUEST_UPDATA_TAC_CYCLE;
            }
 
            break;

        case IF_APP_SR_CURRENT_FREQ:
            ret = REQUEST_SR_CELL_FREQ;
            break;
 
        case IF_APP_SR_BBU_CFG:
            ret = REQUEST_SR_BBU_CFG;
            break;
            
        case IF_APP_SR_TOTAL_CFG:
            ret = REQUEST_SR_TOTAL_CFG;
            break;

        case IF_APP_SR_DEVICE_LOG:
            ret = REQUEST_SR_DEVICE_LOG;
            break;

        case IF_APP_MANUAL_REBOOT_BBU:
            ret = REQUEST_MANUAL_REBOOT_BBU;
            break;

        case IF_APP_ADD_WHITELIST:
            ret = REQUEST_ADD_WHITELIST;
            break;  

        case IF_APP_DEL_WHITELIST:
            ret = REQUEST_DEL_WHITELIST;
            break;  

       case IF_APP_UE_REDIRECT_ON:

            redirectInfo = (UE_REDIRECT *)buf_tmp;
            cli_app_log(CLI_LOG_NOTICE, "slotId  [%d]\n", redirectInfo->slotId);

            if (redirectInfo->slotId > 0 && redirectInfo->slotId <= 7)
            {
                cli_app_log(CLI_LOG_NOTICE, "ranType  [%d]\n", redirectInfo->ranType);

                int index = redirectInfo->slotId;

                if( dev_conf.redirect[index - 1].enable == 0){
                    dev_conf.redirect[index - 1].enable = 1;
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].enable);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = enableStr;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set enable!  [%s]\n",node.data);
                }


                if ( (redirectInfo->ranType >=0 && redirectInfo->ranType <= 5)
                    && dev_conf.redirect[index - 1].ranType != redirectInfo->ranType )
                {
                    dev_conf.redirect[index - 1].ranType = redirectInfo->ranType;
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].ranType);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = ranTypeStr;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ranType!  [%s]\n",node.data);
                }

                if ( (redirectInfo->band >=0 && redirectInfo->band <= 44)
                    && dev_conf.redirect[index - 1].band != redirectInfo->band )
                {
                    dev_conf.redirect[index - 1].band = redirectInfo->band;
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].band);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = bandStr;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set band!  [%s]\n",node.data);
                }

                if ( (redirectInfo->freqList[0] >=0 && redirectInfo->freqList[0] <= 65535)
                    && dev_conf.redirect[index - 1].freqList[0] != redirectInfo->freqList[0] )
                {
                    dev_conf.redirect[index - 1].freqList[0] = redirectInfo->freqList[0];
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].freqList[0]);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = freq1Str;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set freq1!  [%s]\n",node.data);
                }

                cli_app_log(CLI_LOG_NOTICE, "freq2  [%d]\n",redirectInfo->freqList[1]);
                if ( (redirectInfo->freqList[1] >=0 && redirectInfo->freqList[1] <= 65535)
                    && dev_conf.redirect[index - 1].freqList[1] != redirectInfo->freqList[1] )
                {
                    dev_conf.redirect[index - 1].freqList[1] = redirectInfo->freqList[1];
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].freqList[1]);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = freq2Str;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set freq2!  [%s]\n",node.data);
                }

                if ( (redirectInfo->freqList[2] >=0 && redirectInfo->freqList[2] <= 65535)
                    && dev_conf.redirect[index - 1].freqList[2] != redirectInfo->freqList[2] )
                {
                    dev_conf.redirect[index - 1].freqList[2] = redirectInfo->freqList[2];
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].freqList[2]);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = freq3Str;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set freq3!  [%s]\n",node.data);
                }

                if ( (redirectInfo->freqList[3] >=0 && redirectInfo->freqList[3] <= 65535)
                    && dev_conf.redirect[index - 1].freqList[3] != redirectInfo->freqList[3] )
                {
                    dev_conf.redirect[index - 1].freqList[3] = redirectInfo->freqList[3];
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].freqList[3]);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = freq4Str;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set freq4!  [%s]\n",node.data);
                }

                if ( (redirectInfo->freqList[4] >=0 && redirectInfo->freqList[4] <= 65535)
                    && dev_conf.redirect[index - 1].freqList[4] != redirectInfo->freqList[4] )
                {
                    dev_conf.redirect[index - 1].freqList[4] = redirectInfo->freqList[4];
                    char buff[DEV_INFO_NUM_LEN] = {0};
                    sprintf(buff,"%d",dev_conf.redirect[index - 1].freqList[4]);

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = freq5Str;
                    node.data = buff;
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set freq5!  [%s]\n",node.data);
                }

                if( redirectInfo->imsiList[0][0] != '\0'
                     && (strncmp((char *)dev_conf.redirect[index - 1].imsiList[0], 
                                    (char *)redirectInfo->imsiList[0], strlen((char *)redirectInfo->imsiList[0]))) )
                {
                    strncpy((char *)dev_conf.redirect[index - 1].imsiList[0], 
                                    (char *)redirectInfo->imsiList[0], strlen((char *)redirectInfo->imsiList[0]));

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = imsi1Str;
                    node.data = (char *)dev_conf.redirect[index - 1].imsiList[0];
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ismi1!  [%s]\n",node.data);
                }

                if( redirectInfo->imsiList[1][0] != '\0'
                     && (strncmp((char *)dev_conf.redirect[index - 1].imsiList[1], 
                                    (char *)redirectInfo->imsiList[1], 
                                    strlen((char *)redirectInfo->imsiList[1]))) )
                {
                    strncpy((char *)dev_conf.redirect[index - 1].imsiList[1], 
                                    (char *)redirectInfo->imsiList[1], 
                                    strlen((char *)redirectInfo->imsiList[1]));

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = imsi2Str;
                    node.data = (char *)dev_conf.redirect[index - 1].imsiList[1];
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ismi2!  [%s]\n",node.data);
                }

                if( redirectInfo->imsiList[2][0] != '\0'
                     && (strncmp((char *)dev_conf.redirect[index - 1].imsiList[2], 
                                    (char *)redirectInfo->imsiList[2], 
                                    strlen((char *)redirectInfo->imsiList[2]))) )
                {
                    strncpy((char *)dev_conf.redirect[index - 1].imsiList[2], 
                                    (char *)redirectInfo->imsiList[2], 
                                    strlen((char *)redirectInfo->imsiList[2]));

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = imsi3Str;
                    node.data = (char *)dev_conf.redirect[index - 1].imsiList[2];
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ismi3!  [%s]\n",node.data);
                }

                if( redirectInfo->imsiList[3][0] != '\0'
                     && (strncmp((char *)dev_conf.redirect[index - 1].imsiList[3], 
                                    (char *)redirectInfo->imsiList[3], 
                                    strlen((char *)redirectInfo->imsiList[3]))) )
                {
                    strncpy((char *)dev_conf.redirect[index - 1].imsiList[3], 
                                    (char *)redirectInfo->imsiList[3], 
                                    strlen((char *)redirectInfo->imsiList[3]));

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = imsi4Str;
                    node.data = (char *)dev_conf.redirect[index - 1].imsiList[3];
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ismi4!  [%s]\n",node.data);
                }

                if( redirectInfo->imsiList[4][0] != '\0'
                     && (strncmp((char *)dev_conf.redirect[index - 1].imsiList[4], 
                                    (char *)redirectInfo->imsiList[4], 
                                    strlen((char *)redirectInfo->imsiList[4]))) )
                {
                    strncpy((char *)dev_conf.redirect[index - 1].imsiList[4], 
                                    (char *)redirectInfo->imsiList[4], 
                                    strlen((char *)redirectInfo->imsiList[4]));

                    node.lvl2 = redirectStr;
                    node.lvl3 = cellNumberStr;
                    
                    node.id = index;
                    node.name = imsi5Str;
                    node.data = (char *)dev_conf.redirect[index - 1].imsiList[4];
                    xml_set_nodeInfo(&node);
				
				    cli_app_log(CLI_LOG_NOTICE, "set ismi5!  [%s]\n",node.data);
                }
            }



            ret = REQUEST_UE_REDIRECT_ON;
            break;

       case IF_APP_UE_REDIRECT_OFF:

            redirectInfo = (UE_REDIRECT *)buf_tmp;
            cli_app_log(CLI_LOG_NOTICE, "slotId  [%d]\n", redirectInfo->slotId);

            if (redirectInfo->slotId > 0 && redirectInfo->slotId <= 7)
            {
                
                int index = redirectInfo->slotId;

                dev_conf.redirect[index - 1].enable = 0;
                char buff[DEV_INFO_NUM_LEN] = {0};
                sprintf(buff,"%d",dev_conf.redirect[index - 1].enable);

                node.lvl2 = redirectStr;
                node.lvl3 = cellNumberStr;
                    
                node.id = index;
                node.name = enableStr;
                node.data = buff;
                xml_set_nodeInfo(&node);
				
				cli_app_log(CLI_LOG_NOTICE, "set enable!  [%s]\n",node.data);
            }
           ret = REQUEST_UE_REDIRECT_OFF;
           break;   

       case IF_APP_EUTRAN_BBU_INFO:
           ret = REQUEST_SR_TOTALCFG_MNG;
           //ret = REQUEST_EUTRAN_SHOW_BBU_INFO;
           break;
     
       case IF_APP_CFG_WIRELESS:
           ret = REQUEST_EUTRAN_CONFIG_CELL;
           break;

       case IF_APP_MANUAL_SNIFER:
           ret = REQUEST_EUTRAN_MANUAL_SNIFFER;
           break;

       case IF_APP_SR_EUTRAN_VERSION:
           ret = REQUEST_EUTRAN_SOFTWARE_VERSION;
           break;

       case IF_APP_DATA_CYCLE:

            sInfo = (SRV_INFO *)buf_tmp;
            if (sInfo->cycle[0] != 0
                && strcmp(dev_conf.mng.cycle, sInfo->cycle) != 0) 
			{
                bzero(dev_conf.mng.cycle, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.mng.cycle, sInfo->cycle);

                node.lvl2 = MngSrv_string;
                node.name = cycle_string;
                node.data = sInfo->cycle;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s %s \n", node.lvl2, node.name, node.data);
                ret = REQUEST_UPDATA_DATA_CYCLE;
            }
 
            break;

        case IF_APP_DEVICE_MODE:

             wkMode = (WORKMODE *)buf_tmp;
            if ( wkMode->workMode[0] != 0
                && strcmp(dev_conf.workMode.workMode, wkMode->workMode) != 0) 
			{
                bzero(dev_conf.workMode.workMode, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.workMode.workMode, wkMode->workMode);
                node.lvl2 = workMode;
                node.name = deviceMode ;
                node.data = wkMode->workMode;
                cli_app_log(CLI_LOG_INFO, "set %s  %s  %s \n", node.lvl2, node.name, node.data);
                xml_set_nodeInfo(&node);
                ret = REQUEST_UPDATA_REBOOT;
            }

            break;
        
       case IF_APP_WORK_PERIOD:
            wkMode = (WORKMODE *)buf_tmp;
            if ( wkMode->workPeriod[0] != 0
                && strcmp(dev_conf.workMode.workPeriod, wkMode->workPeriod) != 0) 
			{
                bzero(dev_conf.workMode.workPeriod, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.workMode.workPeriod, wkMode->workPeriod);
                node.lvl2 = workMode;
                node.name = workPeriod ;
                node.data = wkMode->workPeriod;
                cli_app_log(CLI_LOG_INFO, "set %s  %s  %s \n", node.lvl2, node.name, node.data);
                xml_set_nodeInfo(&node);
            }
            if ( wkMode->powerOffTime[0] != 0
                && strcmp(dev_conf.workMode.powerOffTime, wkMode->powerOffTime) != 0) 
			{
                bzero(dev_conf.workMode.powerOffTime, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.workMode.powerOffTime, wkMode->powerOffTime);
                node.lvl2 = workMode;
                node.name = powerOffTime ;
                node.data = wkMode->powerOffTime;
                cli_app_log(CLI_LOG_INFO, "set %s  %s  %s \n", node.lvl2, node.name, node.data);
                xml_set_nodeInfo(&node);
            }
            break;

        case IF_APP_UE_FILTER_ON:
             ret = REQUEST_UE_FILTER_ON;
             break;
 
        case IF_APP_UE_FILTER_OFF:
             ret = REQUEST_UE_FILTER_OFF;
             break;

        case IF_APP_SET_BLACKLIST_ON:
             ret = REQUEST_SET_BLACKLIST_ON;
             break;

        case IF_APP_GSM1_CHNG:
        case IF_APP_GSM2_CHNG:
            node.type = Wireless_gsm_type;
            if (module == IF_APP_GSM1_CHNG) 
			{
                w1Info =  (WIRELESS_GSM_INFO *)buf_tmp;
                g1Info = &w1Info->gsm1;
                t1Info = &dev_conf.capGsm.gsm1;
                lvl3 = wireless_base1;
                tmp = REQUEST_UPDATA_GSM1;
            } 
			else 
			{
                w1Info =  (WIRELESS_GSM_INFO *)buf_tmp;
                g1Info = &w1Info->gsm2;
                t1Info = &dev_conf.capGsm.gsm2;
                lvl3 = wireless_base2;
                tmp = REQUEST_UPDATA_GSM2;
            }
            if (g1Info->band[0] != 0 && strcmp(t1Info->band, g1Info->band) != 0) 
			{
                bzero(t1Info->band, DEV_INFO_NUM_LEN);
                strcpy(t1Info->band, g1Info->band);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_band;
                node.data = t1Info->band;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->bcc[0] != 0 && strcmp(t1Info->bcc, g1Info->bcc) != 0) 
			{
                bzero(t1Info->bcc, DEV_INFO_NUM_LEN);
                strcpy(t1Info->bcc, g1Info->bcc);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_BCC;
                node.data = t1Info->bcc;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->mcc[0] != 0 && strcmp(t1Info->mcc, g1Info->mcc) != 0) 
			{
                bzero(t1Info->mcc, DEV_INFO_NUM_LEN);
                strcpy(t1Info->mcc, g1Info->mcc);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_MCC;
                node.data = t1Info->mcc;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->mnc[0] != 0 && strcmp(t1Info->mnc, g1Info->mnc) != 0) 
			{
                bzero(t1Info->mnc, DEV_INFO_NUM_LEN);
                strcpy(t1Info->mnc, g1Info->mnc);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_MNC;
                node.data = t1Info->mnc;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->lac[0] != 0 && strcmp(t1Info->lac, g1Info->lac) != 0) 
			{
                bzero(t1Info->lac, DEV_INFO_NUM_LEN);
                strcpy(t1Info->lac, g1Info->lac);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_LAC;
                node.data = t1Info->lac;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->workMode[0] != 0 && strcmp(t1Info->workMode, g1Info->workMode) != 0) 
			{
                bzero(t1Info->workMode, DEV_INFO_NUM_LEN);
                strcpy(t1Info->workMode, g1Info->workMode);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_workMode;
                node.data = t1Info->workMode;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->configMode[0] != 0 && strcmp(t1Info->configMode, g1Info->configMode) != 0) 
			{
                bzero(t1Info->configMode, DEV_INFO_NUM_LEN);
                strcpy(t1Info->configMode, g1Info->configMode);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_configMode;
                node.data = t1Info->configMode;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->captime[0] != 0 && strcmp(t1Info->captime, g1Info->captime) != 0) 
			{
                bzero(t1Info->captime, DEV_INFO_NUM_LEN);
                strcpy(t1Info->captime, g1Info->captime);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = captime;
                node.data = t1Info->captime;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->thld[0] != 0 && strcmp(t1Info->thld, g1Info->thld) != 0) 
			{
                bzero(t1Info->thld, DEV_INFO_NUM_LEN);
                strcpy(t1Info->thld, g1Info->thld);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_THLD ;
                node.data = t1Info->thld;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->lowatt[0] != 0 && strcmp(t1Info->lowatt, g1Info->lowatt) != 0) 
			{
                bzero(t1Info->lowatt, DEV_INFO_NUM_LEN);
                strcpy(t1Info->lowatt, g1Info->lowatt);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_lowatt ;
                node.data = t1Info->lowatt;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->upatt[0] != 0 && strcmp(t1Info->upatt, g1Info->upatt) != 0) 
			{
                bzero(t1Info->upatt, DEV_INFO_NUM_LEN);
                strcpy(t1Info->upatt, g1Info->upatt);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_upatt ;
                node.data = t1Info->upatt;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->cnum[0] != 0 && strcmp(t1Info->cnum, g1Info->cnum) != 0) 
			{
                bzero(t1Info->cnum, DEV_INFO_NUM_LEN);
                strcpy(t1Info->cnum, g1Info->cnum);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_cnum ;
                node.data = t1Info->cnum;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (g1Info->cro[0] != 0 && strcmp(t1Info->cro, g1Info->cro) != 0) 
			{
                bzero(t1Info->cro, DEV_INFO_NUM_LEN);
                strcpy(t1Info->cro, g1Info->cro);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_cro;
                node.data = t1Info->cro;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }

            if (g1Info->startFreq900[0] != 0 && strcmp(t1Info->startFreq900, g1Info->startFreq900) != 0) 
			{
                bzero(t1Info->startFreq900, DEV_INFO_NUM_LEN);
                strcpy(t1Info->startFreq900, g1Info->startFreq900);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_startFreq900 ;
                node.data = t1Info->startFreq900;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }

            if (g1Info->endFreq900[0] != 0 && strcmp(t1Info->endFreq900, g1Info->endFreq900) != 0) 
			{
                bzero(t1Info->endFreq900, DEV_INFO_NUM_LEN);
                strcpy(t1Info->endFreq900, g1Info->endFreq900);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_endFreq900 ;
                node.data = t1Info->endFreq900;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }

            if (g1Info->startFreq1800[0] != 0 && strcmp(t1Info->startFreq1800, g1Info->startFreq1800) != 0) 
			{
                bzero(t1Info->startFreq1800, DEV_INFO_NUM_LEN);
                strcpy(t1Info->startFreq1800, g1Info->startFreq1800);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_startFreq1800 ;
                node.data = t1Info->startFreq1800;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }

            if (g1Info->endFreq1800[0] != 0 && strcmp(t1Info->endFreq1800, g1Info->endFreq1800) != 0) 
			{
                bzero(t1Info->endFreq1800, DEV_INFO_NUM_LEN);
                strcpy(t1Info->endFreq1800, g1Info->endFreq1800);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_endFreq1800 ;
                node.data = t1Info->endFreq1800;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }

            if (g1Info->PowerLevel[0] != 0 && strcmp(t1Info->PowerLevel, g1Info->PowerLevel) != 0) 
			{
                bzero(t1Info->PowerLevel, DEV_INFO_NUM_LEN);
                strcpy(t1Info->PowerLevel, g1Info->PowerLevel);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = PowerLevelStr ;
                node.data = t1Info->PowerLevel;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            
            if (strcmp(dev_conf.dev.protocol, ZHONGDUN) == 0)
            {
                if (ret != REQUEST_UPDATA_NONE)
                {
                    cmdList.commandList[cmdList.commandNum].cmdId = ret;
                    cmdList.commandNum++;
                }
                node.lvl3 = NULL;
                node.lvl2 = NULL;
                node.type = Wireless_gsm_type;
                sprintf(w1Info->intvl, "%d", atoi(g1Info->captime)/60);
                if (w1Info->intvl[0] != 0
                        && strcmp(dev_conf.capGsm.intvl, w1Info->intvl) != 0) 
                {
                    bzero(dev_conf.capGsm.intvl, DEV_INFO_NUM_LEN);
                    strcpy(dev_conf.capGsm.intvl, w1Info->intvl);
                    node.lvl2 = Wireless_string;
                    node.name = cap_itvl;
                    node.data = w1Info->intvl;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_REDET;
                    cmdList.commandNum++;
                }
            }

           break;

        case IF_APP_CHNG_GSM :
            node.type = Wireless_gsm_type;
            w1Info = (WIRELESS_GSM_INFO *)buf_tmp;
            for (tmp = 0; tmp < 2; tmp++)
            {
                if (tmp == 0)
                {
                    g1Info = &w1Info->gsm1;
                    t1Info = &dev_conf.capGsm.gsm1;
                    lvl3 = wireless_base1;
                }
                else
                {
                    g1Info = &w1Info->gsm2;
                    t1Info = &dev_conf.capGsm.gsm2;
                    lvl3 = wireless_base2;
                } 

                ret = REQUEST_UPDATA_GSM_CFG;
                if (g1Info->band[0] != 0 && strcmp(t1Info->band, g1Info->band) != 0) 
			    {
                    bzero(t1Info->band, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->band, g1Info->band);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_band;
                    node.data = t1Info->band;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
         
                }
                if (g1Info->bcc[0] != 0 && strcmp(t1Info->bcc, g1Info->bcc) != 0) 
			    {
                    bzero(t1Info->bcc, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->bcc, g1Info->bcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_BCC;
                    node.data = t1Info->bcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                
                }
                if (g1Info->mcc[0] != 0 && strcmp(t1Info->mcc, g1Info->mcc) != 0) 
			    {
                    bzero(t1Info->mcc, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->mcc, g1Info->mcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_MCC;
                    node.data = t1Info->mcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
              
                }
                if (g1Info->mnc[0] != 0 && strcmp(t1Info->mnc, g1Info->mnc) != 0) 
		        {
                    bzero(t1Info->mnc, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->mnc, g1Info->mnc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_MNC;
                    node.data = t1Info->mnc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
    
                }
                if (g1Info->lac[0] != 0 && strcmp(t1Info->lac, g1Info->lac) != 0) 
			    {
                    bzero(t1Info->lac, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->lac, g1Info->lac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_LAC;
                    node.data = t1Info->lac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
 
                }
                if (g1Info->nei[0] != 0 && strcmp(t1Info->nei, g1Info->nei) != 0) 
			    {
                    bzero(t1Info->nei, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->nei, g1Info->nei);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_NEI;
                    node.data = t1Info->nei;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
        
                }
                if (g1Info->rssi[0] != 0 && strcmp(t1Info->rssi, g1Info->rssi) != 0) 
	            {
                    bzero(t1Info->rssi, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->rssi, g1Info->rssi);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_RSSI;
                    node.data = t1Info->rssi;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (g1Info->thld[0] != 0 && strcmp(t1Info->thld, g1Info->thld) != 0) 
			    {
                    bzero(t1Info->thld, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->thld, g1Info->thld);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = Bts_THLD ;
                    node.data = t1Info->thld;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
         
                }
                if (g1Info->PowerLevel[0] != 0 && strcmp(t1Info->PowerLevel, g1Info->PowerLevel) != 0) 
                {
                    bzero(t1Info->PowerLevel, DEV_INFO_NUM_LEN);
                    strcpy(t1Info->PowerLevel, g1Info->PowerLevel);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = lvl3;
                    node.name = PowerLevelStr ;
                    node.data = t1Info->PowerLevel;
                    xml_set_nodeInfo(&node);
                    ret = tmp;
                }
            
             }
             break;

        case IF_APP_CDMA_PARAM_CFG:
            node.type = Wireless_cdma_type;
            
            wcdma =  (WIRELESS_CDMA_INFO *)buf_tmp;
            cInfo = &wcdma->cdma;
            cInfo1 = &dev_conf.capCdma.cdma;
            lvl3 = wireless_base;
            tmp = REQUEST_UPDATA_CDMA;
            if (cInfo->mcc[0] != 0 && strcmp(cInfo->mcc, cInfo1->mcc) != 0) 
			{
                bzero(cInfo1->mcc, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->mcc, cInfo->mcc);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_MCC;
                node.data = cInfo->mcc;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->mnc[0] != 0 && strcmp(cInfo->mnc, cInfo1->mnc) != 0) 
			{
                bzero(cInfo1->mnc, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->mnc, cInfo->mnc);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = Bts_MNC;
                node.data = cInfo->mnc;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->pn[0] != 0 && strcmp(cInfo->pn, cInfo1->pn) != 0) 
			{
                bzero(cInfo1->pn, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->pn, cInfo->pn);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = pn;
                node.data = cInfo->pn;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->sid[0] != 0 && strcmp(cInfo->sid, cInfo1->sid) != 0) 
			{
                bzero(cInfo1->sid, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->sid, cInfo->sid);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = sid;
                node.data = cInfo->sid;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->nid[0] != 0 && strcmp(cInfo->nid, cInfo1->nid) != 0) 
			{
                bzero(cInfo1->nid, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->nid, cInfo->nid);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = nid;
                node.data = cInfo->nid;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->bsid[0] != 0 && strcmp(cInfo->bsid, cInfo1->bsid) != 0) 
			{
                bzero(cInfo1->bsid, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->bsid, cInfo->bsid);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = bsid;
                node.data = cInfo->bsid;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->regnum[0] != 0 && strcmp(cInfo->regnum, cInfo1->regnum) != 0) 
			{
                bzero(cInfo1->regnum, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->regnum, cInfo->regnum);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = regnum;
                node.data = cInfo->regnum;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->workModel[0] != 0 && strcmp(cInfo->workModel, cInfo1->workModel) != 0) 
			{
                bzero(cInfo1->workModel, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->workModel, cInfo->workModel);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = workModel;
                node.data = cInfo->workModel;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->freq1[0] != 0 && strcmp(cInfo->freq1, cInfo1->freq1) != 0) 
			{
                bzero(cInfo1->freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->freq1, cInfo->freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = freq1;
                node.data = cInfo->freq1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->workMode1[0] != 0 && strcmp(cInfo->workMode1, cInfo1->workMode1) != 0) 
			{
                bzero(cInfo1->workMode1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->workMode1, cInfo->workMode1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = workMode1;
                node.data = cInfo->workMode1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scantime1[0] != 0 && strcmp(cInfo->scantime1, cInfo1->scantime1) != 0) 
			{
                bzero(cInfo1->scantime1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scantime1, cInfo->scantime1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scantime1;
                node.data = cInfo->scantime1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scancaptime1[0] != 0 && strcmp(cInfo->scancaptime1, cInfo1->scancaptime1) != 0) 
			{
                bzero(cInfo1->scancaptime1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scancaptime1, cInfo->scancaptime1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scancaptime1;
                node.data = cInfo->scancaptime1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor1Freq1[0] != 0 && strcmp(cInfo->neibor1Freq1, cInfo1->neibor1Freq1) != 0) 
			{
                bzero(cInfo1->neibor1Freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor1Freq1, cInfo->neibor1Freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor1Freq1;
                node.data = cInfo->neibor1Freq1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor2Freq1[0] != 0 && strcmp(cInfo->neibor2Freq1, cInfo1->neibor2Freq1) != 0) 
			{
                bzero(cInfo1->neibor2Freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor2Freq1, cInfo->neibor2Freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor2Freq1;
                node.data = cInfo->neibor2Freq1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor3Freq1[0] != 0 && strcmp(cInfo->neibor3Freq1, cInfo1->neibor3Freq1) != 0) 
			{
                bzero(cInfo1->neibor3Freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor3Freq1, cInfo->neibor3Freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor3Freq1;
                node.data = cInfo->neibor3Freq1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor4Freq1[0] != 0 && strcmp(cInfo->neibor4Freq1, cInfo1->neibor4Freq1) != 0) 
			{
                bzero(cInfo1->neibor4Freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor4Freq1, cInfo->neibor4Freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor4Freq1;
                node.data = cInfo->neibor4Freq1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
           if (cInfo->freq2[0] != 0 && strcmp(cInfo->freq2, cInfo1->freq2) != 0) 
			{
                bzero(cInfo1->freq2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->freq2, cInfo->freq2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = freq2;
                node.data = cInfo->freq2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->workMode2[0] != 0 && strcmp(cInfo->workMode1, cInfo1->workMode2) != 0) 
			{
                bzero(cInfo1->workMode2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->workMode2, cInfo->workMode2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = workMode2;
                node.data = cInfo->workMode2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scantime2[0] != 0 && strcmp(cInfo->scantime2, cInfo1->scantime2) != 0) 
			{
                bzero(cInfo1->scantime2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scantime2, cInfo->scantime2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scantime2;
                node.data = cInfo->scantime1;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scancaptime2[0] != 0 && strcmp(cInfo->scancaptime2, cInfo1->scancaptime2) != 0) 
			{
                bzero(cInfo1->scancaptime2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scancaptime2, cInfo->scancaptime2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scancaptime2;
                node.data = cInfo->scancaptime2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor1Freq2[0] != 0 && strcmp(cInfo->neibor1Freq2, cInfo1->neibor1Freq2) != 0) 
			{
                bzero(cInfo1->neibor2Freq1, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor2Freq1, cInfo->neibor2Freq1);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor1Freq2;
                node.data = cInfo->neibor1Freq2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor2Freq2[0] != 0 && strcmp(cInfo->neibor2Freq2, cInfo1->neibor2Freq2) != 0) 
			{
                bzero(cInfo1->neibor2Freq2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor2Freq2, cInfo->neibor2Freq2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor2Freq2;
                node.data = cInfo->neibor2Freq2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor3Freq2[0] != 0 && strcmp(cInfo->neibor3Freq2, cInfo1->neibor3Freq2) != 0) 
			{
                bzero(cInfo1->neibor3Freq2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor3Freq2, cInfo->neibor3Freq2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor3Freq2;
                node.data = cInfo->neibor3Freq2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor4Freq2[0] != 0 && strcmp(cInfo->neibor4Freq2, cInfo1->neibor4Freq2) != 0) 
			{
                bzero(cInfo1->neibor4Freq2, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor4Freq2, cInfo->neibor4Freq2);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor4Freq2;
                node.data = cInfo->neibor4Freq2;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
           if (cInfo->freq3[0] != 0 && strcmp(cInfo->freq3, cInfo1->freq3) != 0) 
			{
                bzero(cInfo1->freq3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->freq3, cInfo->freq3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = freq3;
                node.data = cInfo->freq3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->workMode3[0] != 0 && strcmp(cInfo->workMode3, cInfo1->workMode3) != 0) 
			{
                bzero(cInfo1->workMode3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->workMode3, cInfo->workMode3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = workMode3;
                node.data = cInfo->workMode3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scantime3[0] != 0 && strcmp(cInfo->scantime3, cInfo1->scantime3) != 0) 
			{
                bzero(cInfo1->scantime3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scantime3, cInfo->scantime3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scantime3;
                node.data = cInfo->scantime3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scancaptime3[0] != 0 && strcmp(cInfo->scancaptime3, cInfo1->scancaptime3) != 0) 
			{
                bzero(cInfo1->scancaptime3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scancaptime3, cInfo->scancaptime3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scancaptime3;
                node.data = cInfo->scancaptime3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor1Freq3[0] != 0 && strcmp(cInfo->neibor1Freq3, cInfo1->neibor1Freq3) != 0) 
			{
                bzero(cInfo1->neibor1Freq3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor1Freq3, cInfo->neibor1Freq3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor1Freq3;
                node.data = cInfo->neibor1Freq3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor2Freq3[0] != 0 && strcmp(cInfo->neibor2Freq3, cInfo1->neibor2Freq3) != 0) 
			{
                bzero(cInfo1->neibor2Freq3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor2Freq3, cInfo->neibor2Freq3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor2Freq3;
                node.data = cInfo->neibor2Freq3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor3Freq3[0] != 0 && strcmp(cInfo->neibor3Freq3, cInfo1->neibor3Freq3) != 0) 
			{
                bzero(cInfo1->neibor3Freq3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor3Freq3, cInfo->neibor3Freq3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor3Freq3;
                node.data = cInfo->neibor3Freq3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor4Freq3[0] != 0 && strcmp(cInfo->neibor4Freq3, cInfo1->neibor4Freq3) != 0) 
			{
                bzero(cInfo1->neibor4Freq3, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor4Freq3, cInfo->neibor4Freq3);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor4Freq3;
                node.data = cInfo->neibor4Freq3;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->freq4[0] != 0 && strcmp(cInfo->freq4, cInfo1->freq4) != 0) 
			{
                bzero(cInfo1->freq4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->freq4, cInfo->freq4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = freq4;
                node.data = cInfo->freq4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->workMode4[0] != 0 && strcmp(cInfo->workMode4, cInfo1->workMode4) != 0) 
			{
                bzero(cInfo1->workMode4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->workMode4, cInfo->workMode4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = workMode4;
                node.data = cInfo->workMode4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scantime4[0] != 0 && strcmp(cInfo->scantime4, cInfo1->scantime4) != 0) 
			{
                bzero(cInfo1->scantime4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scantime4, cInfo->scantime4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scantime4;
                node.data = cInfo->scantime4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->scancaptime4[0] != 0 && strcmp(cInfo->scancaptime4, cInfo1->scancaptime4) != 0) 
			{
                bzero(cInfo1->scancaptime4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->scancaptime4, cInfo->scancaptime4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = scancaptime4;
                node.data = cInfo->scancaptime4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor1Freq4[0] != 0 && strcmp(cInfo->neibor1Freq4, cInfo1->neibor1Freq4) != 0) 
			{
                bzero(cInfo1->neibor1Freq4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor1Freq4, cInfo->neibor1Freq4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor1Freq4;
                node.data = cInfo->neibor1Freq4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor2Freq4[0] != 0 && strcmp(cInfo->neibor2Freq4, cInfo1->neibor2Freq4) != 0) 
			{
                bzero(cInfo1->neibor2Freq4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor2Freq4, cInfo->neibor2Freq4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor2Freq4;
                node.data = cInfo->neibor2Freq4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor3Freq4[0] != 0 && strcmp(cInfo->neibor3Freq4, cInfo1->neibor3Freq4) != 0) 
			{
                bzero(cInfo1->neibor3Freq4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor3Freq4, cInfo->neibor3Freq4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor3Freq4;
                node.data = cInfo->neibor3Freq4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
            if (cInfo->neibor4Freq4[0] != 0 && strcmp(cInfo->neibor4Freq4, cInfo1->neibor4Freq4) != 0) 
			{
                bzero(cInfo1->neibor4Freq4, DEV_INFO_NUM_LEN);
                strcpy(cInfo1->neibor4Freq4, cInfo->neibor4Freq4);
                node.lvl2 = Wireless_string;
                node.lvl3 = lvl3;
                node.name = neibor4Freq4;
                node.data = cInfo->neibor4Freq4;
                xml_set_nodeInfo(&node);
                ret = tmp;
            }
           break;

        case IF_APP_WCDMA_PARAM_CFG:
        case IF_APP_TDSCDMA_PARAM_CFG:
            if (module == IF_APP_WCDMA_PARAM_CFG)
            {
                node.type = Wireless_wcdma_type;
                WCDMA_INFO *paramInfo = &dev_conf.capWcdma.wcdma;
                wWcdma = (WIRELESS_WCDMA_INFO *)buf_tmp;
                WCDMA_INFO *wcdmaInfo = &wWcdma->wcdma;
                if (wcdmaInfo->mcc[0] != 0 && strcmp(paramInfo->mcc, wcdmaInfo->mcc) != 0)
                {
                    bzero(paramInfo->mcc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->mcc, wcdmaInfo->mcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_MCC;
                    node.data = wcdmaInfo->mcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->mnc[0] != 0 && strcmp(paramInfo->mnc, wcdmaInfo->mnc) != 0)
                {
                    bzero(paramInfo->mnc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->mnc,  wcdmaInfo->mnc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_MNC;
                    node.data = wcdmaInfo->mnc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->lac[0] != 0 && strcmp(paramInfo->lac, wcdmaInfo->lac) != 0)
                {
                    bzero(paramInfo->lac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->lac,  wcdmaInfo->lac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_LAC;
                    node.data = wcdmaInfo->lac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->psc[0] != 0 && strcmp(paramInfo->psc, wcdmaInfo->psc) != 0)
                {
                    bzero(paramInfo->psc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->psc,  wcdmaInfo->psc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = psc;
                    node.data = wcdmaInfo->psc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->arfcn[0] != 0 && strcmp(paramInfo->arfcn, wcdmaInfo->arfcn) != 0)
                {
                    bzero(paramInfo->arfcn, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->arfcn,  wcdmaInfo->arfcn);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = arfcn;
                    node.data = wcdmaInfo->arfcn;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->rac[0] != 0 && strcmp(paramInfo->rac, wcdmaInfo->rac) != 0)
                {
                    bzero(paramInfo->rac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->rac,  wcdmaInfo->rac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = rac;
                    node.data = wcdmaInfo->rac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->cellId[0] != 0 && strcmp(paramInfo->cellId, wcdmaInfo->cellId) != 0)
                {
                    bzero(paramInfo->cellId, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->cellId,  wcdmaInfo->cellId);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = cellId;
                    node.data = wcdmaInfo->cellId;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->autoLac[0] != 0 && strcmp(paramInfo->autoLac, wcdmaInfo->autoLac) != 0)
                {
                    bzero(paramInfo->autoLac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->autoLac,  wcdmaInfo->autoLac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = autoLac;
                    node.data = wcdmaInfo->autoLac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->dac[0] != 0 && strcmp(paramInfo->dac, wcdmaInfo->dac) != 0)
                {
                    bzero(paramInfo->dac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->dac,  wcdmaInfo->dac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = dac;
                    node.data = wcdmaInfo->dac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
 
                }
               if (wcdmaInfo->redirect[0] != 0 && strcmp(paramInfo->redirect, wcdmaInfo->redirect) != 0)
               {
                    bzero(paramInfo->redirect, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->redirect,  wcdmaInfo->redirect);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = redirect;
                    node.data = wcdmaInfo->redirect;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->bcc[0] != 0 && strcmp(paramInfo->bcc, wcdmaInfo->bcc) != 0)
                {
                    bzero(paramInfo->bcc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->bcc,  wcdmaInfo->bcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_BCC;
                    node.data = wcdmaInfo->bcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
 
                 ret = REQUEST_UPDATA_WCDMA;
            }
            else
            {
                node.type = Wireless_tdscdma_type;
                TDSCDMA_INFO *paramInfo = &dev_conf.capTdscdma.tdscdma;
                wTdscdma = (WIRELESS_TDSCDMA_INFO *)buf_tmp;
                TDSCDMA_INFO *wcdmaInfo = &wTdscdma->tdscdma;
                if (wcdmaInfo->mcc[0] != 0 && strcmp(paramInfo->mcc, wcdmaInfo->mcc) != 0)
                {
                    bzero(paramInfo->mcc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->mcc, wcdmaInfo->mcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_MCC;
                    node.data = wcdmaInfo->mcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->mnc[0] != 0 && strcmp(paramInfo->mnc, wcdmaInfo->mnc) != 0)
                {
                    bzero(paramInfo->mnc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->mnc,  wcdmaInfo->mnc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_MNC;
                    node.data = wcdmaInfo->mnc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->lac[0] != 0 && strcmp(paramInfo->lac, wcdmaInfo->lac) != 0)
                {
                    bzero(paramInfo->lac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->lac,  wcdmaInfo->lac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_LAC;
                    node.data = wcdmaInfo->lac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->psc[0] != 0 && strcmp(paramInfo->psc, wcdmaInfo->psc) != 0)
                {
                    bzero(paramInfo->psc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->psc,  wcdmaInfo->psc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = psc;
                    node.data = wcdmaInfo->psc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->arfcn[0] != 0 && strcmp(paramInfo->arfcn, wcdmaInfo->arfcn) != 0)
                {
                    bzero(paramInfo->arfcn, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->arfcn,  wcdmaInfo->arfcn);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = arfcn;
                    node.data = wcdmaInfo->arfcn;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->rac[0] != 0 && strcmp(paramInfo->rac, wcdmaInfo->rac) != 0)
                {
                    bzero(paramInfo->rac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->rac,  wcdmaInfo->rac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = rac;
                    node.data = wcdmaInfo->rac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->cellId[0] != 0 && strcmp(paramInfo->cellId, wcdmaInfo->cellId) != 0)
                {
                    bzero(paramInfo->cellId, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->cellId,  wcdmaInfo->cellId);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = cellId;
                    node.data = wcdmaInfo->cellId;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->autoLac[0] != 0 && strcmp(paramInfo->autoLac, wcdmaInfo->autoLac) != 0)
                {
                    bzero(paramInfo->autoLac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->autoLac,  wcdmaInfo->autoLac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = autoLac;
                    node.data = wcdmaInfo->autoLac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->dac[0] != 0 && strcmp(paramInfo->dac, wcdmaInfo->dac) != 0)
                {
                    bzero(paramInfo->dac, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->dac,  wcdmaInfo->dac);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = dac;
                    node.data = wcdmaInfo->dac;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
 
                }
               if (wcdmaInfo->redirect[0] != 0 && strcmp(paramInfo->redirect, wcdmaInfo->redirect) != 0)
               {
                    bzero(paramInfo->redirect, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->redirect,  wcdmaInfo->redirect);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = redirect;
                    node.data = wcdmaInfo->redirect;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                if (wcdmaInfo->bcc[0] != 0 && strcmp(paramInfo->bcc, wcdmaInfo->bcc) != 0)
                {
                    bzero(paramInfo->bcc, DEV_INFO_NUM_LEN);
                    strcpy(paramInfo->bcc,  wcdmaInfo->bcc);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = Bts_BCC;
                    node.data = wcdmaInfo->bcc;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);

                }
                ret = REQUEST_UPDATA_TDSCDMA;
            }

            break;

        case IF_APP_SNIF_PAR:
            snfInfo = (SNF_INFO *)buf_tmp;
            node.type = Wireless_gsm_type;
            if (snfInfo->isAuto[0] != 0
                && strcmp(dev_conf.snfGsm.isAuto, snfInfo->isAuto) != 0) 
			{
                bzero(dev_conf.snfGsm.isAuto, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.isAuto, snfInfo->isAuto);
                node.lvl2 = sniffer_string;
                node.name = sniffer_auto;
                node.data = snfInfo->isAuto;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
            
            }

            if (snfInfo->bccMode[0] != 0
                && strcmp(dev_conf.snfGsm.bccMode, snfInfo->bccMode) != 0) 
			{
                bzero(dev_conf.snfGsm.bccMode, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.bccMode, snfInfo->bccMode);
                node.lvl2 = sniffer_string;
                node.name = sniffer_mode;
                node.data = snfInfo->bccMode;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
             
            }
            if (snfInfo->cycle[0] != 0
                && strcmp(dev_conf.snfGsm.cycle, snfInfo->cycle) != 0) 
			{
                bzero(dev_conf.snfGsm.cycle, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.cycle, snfInfo->cycle);
                node.lvl2 = sniffer_string;
                node.name = sniffer_cycle;
                node.data = snfInfo->cycle;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
     
            }
            if (snfInfo->hour[0] != 0
                && strcmp(dev_conf.snfGsm.hour, snfInfo->hour) != 0) 
			{
                bzero(dev_conf.snfGsm.hour, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.hour, snfInfo->hour);
                node.lvl2 = sniffer_string;
                node.name = sniffer_hour;
                node.data = snfInfo->hour;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
     
            }
            if (snfInfo->sec[0] != 0
                && strcmp(dev_conf.snfGsm.sec, snfInfo->sec) != 0) 
			{
                bzero(dev_conf.snfGsm.sec, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.sec, snfInfo->sec);
                node.lvl2 = sniffer_string;
                node.name = sniffer_sec;
                node.data = snfInfo->sec;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
     
            }
            if (snfInfo->min[0] != 0
                && strcmp(dev_conf.snfGsm.min, snfInfo->min) != 0) 
			{
                bzero(dev_conf.snfGsm.min, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.min, snfInfo->min);
                node.lvl2 = sniffer_string;
                node.name = sniffer_min;
                node.data = snfInfo->min;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER_PAR;
     
            }                     
            break;

        case IF_APP_WIFI_SWITCH:
            dInfo= (DEV_INFO*)buf_tmp;
            if (dInfo->RFSwitch[0] != 0
                && strcmp(dev_conf.dev.RFSwitch, dInfo->RFSwitch) != 0) 
			{
                bzero(dev_conf.dev.RFSwitch, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.dev.RFSwitch, dInfo->RFSwitch);
                node.name = RfSwitch;
                node.data = dInfo->RFSwitch;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s %s \n", node.name, node.data, dev_conf.dev.RFSwitch);

                if (dev_conf.capGsm.isSupported[0] == '1' )
                {
                    cmdList.commandList[cmdList.commandNum].cellId = 8;
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_ENABLE;
                    cmdList.commandNum++;
                }
                if (dev_conf.capCdma.isSupported[0] == '1' )
                {
                    cmdList.commandList[cmdList.commandNum].cellId = 10;
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_CDMA_WIFI;
                    cmdList.commandNum++;
                }
                if (dev_conf.capWcdma.isSupported[0] == '1' )
                {
                    cmdList.commandList[cmdList.commandNum].cellId = 11;
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_WCDMA_ENABLE;
                    cmdList.commandNum++;
                }
                if (dev_conf.capTdscdma.isSupported[0] == '1' )
                {
                    cmdList.commandList[cmdList.commandNum].cellId = 12;
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TDSCDMA_ENABLE;
                    cmdList.commandNum++;
                }
                if (dev_conf.capLte.isSupported[0] == '1')
                {
                    I32 i = 0;
                    for (; i < LTE_CELL_NUM; i++)
                    {
                        if (atoi(dev_conf.capLte.lte[i].enable) == 1)
                        {
                            cmdList.commandList[cmdList.commandNum].cellId = (i + 1);
                            cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TX_POWER;
                            cmdList.commandNum++;
                        }
                    }
                }        
            }
            break;

        case IF_APP_CAP_INTERVAL:
            w1Info = (WIRELESS_GSM_INFO *)buf_tmp;
            node.type = Wireless_gsm_type;
            if (w1Info->intvl[0] != 0
                && strcmp(dev_conf.capGsm.intvl, w1Info->intvl) != 0) 
			{
                bzero(dev_conf.capGsm.intvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.capGsm.intvl, w1Info->intvl);
                node.lvl2 = Wireless_string;
                node.name = cap_itvl;
                node.data = w1Info->intvl;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_REDET;
            }
            break;

        case IF_APP_CDMA_CAP_INTVL:
            wcdma = (WIRELESS_CDMA_INFO *)buf_tmp; 
            node.type = Wireless_cdma_type;
            if (wcdma->intvl[0] != 0
                && strcmp(dev_conf.capCdma.intvl, wcdma->intvl) != 0) 
			{
                bzero(dev_conf.capCdma.intvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.capCdma.intvl, wcdma->intvl);
                node.lvl2 = Wireless_string;
                node.name = cap_itvl;
                node.data = wcdma->intvl;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_CDMA_REDET;
            }
            break;

        case IF_APP_WCDMA_CAP_INTVL:
            wWcdma = (WIRELESS_WCDMA_INFO *)buf_tmp; 
            node.type = Wireless_wcdma_type;
            if (wWcdma->intvl[0] != 0
                && strcmp(dev_conf.capWcdma.intvl, wWcdma->intvl) != 0) 
			{
                bzero(dev_conf.capWcdma.intvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.capWcdma.intvl, wWcdma->intvl);
                node.lvl2 = Wireless_string;
                node.name = cap_itvl;
                node.data = wWcdma->intvl;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_WCDMA_REDET;
            }
            break;

        case IF_APP_TDSCDMA_CAP_INTVL:
            wTdscdma = (WIRELESS_TDSCDMA_INFO *)buf_tmp; 
            node.type = Wireless_tdscdma_type;
            if (wTdscdma->intvl[0] != 0
                && strcmp(dev_conf.capTdscdma.intvl, wTdscdma->intvl) != 0) 
			{
                bzero(dev_conf.capTdscdma.intvl, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.capTdscdma.intvl, wTdscdma->intvl);
                node.lvl2 = Wireless_string;
                node.name = cap_itvl;
                node.data = wTdscdma->intvl;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_TDSCDMA_REDET;
            }
            break;

        case IF_APP_SNIFFER_SWITCH:
            snfInfo = (SNF_INFO *)buf_tmp;
            node.type = Wireless_gsm_type;
            if (snfInfo->enable[0] != 0
                && strcmp(dev_conf.snfGsm.enable, snfInfo->enable) != 0) 
			{
                bzero(dev_conf.snfGsm.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.enable, snfInfo->enable);
                node.lvl2 = sniffer_string;
                node.name = en_string;
                node.data = snfInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_GSM_SNIFER;
            }
            break;

        case IF_APP_PA_ON:
        case IF_APP_PA_OFF:
            for (; tmp < PA_NUM; tmp++)
 	        {  
                pInfo = (PA_INFO *)(buf_tmp + sizeof(PA_INFO) * tmp );
 	            if (tmp < 7 && pInfo->enable[0] != 0
 	         	      && strcmp(dev_conf.pa[tmp].enable, pInfo->enable )!= 0) 
                {
 	                bzero(dev_conf.pa[tmp].enable, DEV_INFO_NUM_LEN);
                    strcpy(dev_conf.pa[tmp].enable, pInfo->enable);
                    node.lvl2 = pa_string;
                    node.lvl3 = pa_name;
                    node.id = tmp + 1;
                    node.name = en_string;
                    node.type = Wireless_lte_type;
                    node.data = pInfo->enable;
                    pa[tmp + 1] = 1; 
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set  %s %s  pa[%d] %s  \n", node.type, node.name, node.id, node.data);
                    cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TX_POWER;
                    cmdList.commandNum++;
                    bzero(&node, sizeof(CNODE_INFO));
 	            }
                else if (tmp >= 7 && tmp < 9 && pInfo->enable[0] != 0)
                {
                    if (tmp == 7 && strcmp(dev_conf.capGsm.gsm1.enable, pInfo->enable )!= 0)
                    {
                        node.type = Wireless_gsm_type;
                        bzero(dev_conf.capGsm.gsm1.enable, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capGsm.gsm1.enable, pInfo->enable);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base1;
                        node.name = en_string;
                        node.data = dev_conf.capGsm.gsm1.enable;
                        xml_set_nodeInfo(&node);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_ENABLE;
                        cmdList.commandNum++;
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                    } 
                    if (tmp == 8 && strcmp(dev_conf.capGsm.gsm2.enable, pInfo->enable )!= 0)
                    {
                        node.type = Wireless_gsm_type;
                        bzero(dev_conf.capGsm.gsm2.enable, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capGsm.gsm2.enable, pInfo->enable);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base2;
                        node.name = en_string;
                        node.data = dev_conf.capGsm.gsm2.enable;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_ENABLE;
                        cmdList.commandNum++;
                    }   
                    bzero(&node, sizeof(CNODE_INFO));
                } 
                else if (tmp == 9 && pInfo->enable[0] != 0
 	         	      && strcmp(dev_conf.capCdma.enable, pInfo->enable )!= 0)
                {
                        node.type = Wireless_cdma_type;
                        bzero(dev_conf.capCdma.enable, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capCdma.enable, pInfo->enable);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base;
                        node.name = en_string;
                        node.data = dev_conf.capCdma.enable;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_CDMA_WIFI;
                        cmdList.commandNum++;
                        bzero(&node, sizeof(CNODE_INFO));
                }
                else if (tmp == 10 && pInfo->enable[0] != 0
 	         	      && strcmp(dev_conf.capWcdma.enable, pInfo->enable )!= 0)
                {
                        node.type = Wireless_wcdma_type;
                        bzero(dev_conf.capWcdma.enable, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capWcdma.enable, pInfo->enable);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base;
                        node.name = en_string;
                        node.data = dev_conf.capWcdma.enable;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_WCDMA_ENABLE;
                        cmdList.commandNum++;
                }
                else if (tmp == 11 && pInfo->enable[0] != 0
 	         	      && strcmp(dev_conf.capTdscdma.enable, pInfo->enable )!= 0)
                {
                        node.type = Wireless_tdscdma_type;
                        bzero(dev_conf.capTdscdma.enable, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capTdscdma.enable, pInfo->enable);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base;
                        node.name = en_string;
                        node.data = dev_conf.capTdscdma.enable;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TDSCDMA_ENABLE;
                        cmdList.commandNum++;
                        bzero(&node, sizeof(CNODE_INFO));
                }
                        
            }
            
            break;

        case IF_APP_PA_GAIN:
            for (; tmp < PA_NUM; tmp++)
 	        {  
                pInfo = (PA_INFO *)(buf_tmp + sizeof(PA_INFO) * tmp );
 	            if (tmp < 7 && pInfo->gain[0] != 0
 	         	      && strcmp(dev_conf.pa[tmp].gain, pInfo->gain )!= 0) 
                {
 	                bzero(dev_conf.pa[tmp].gain, DEV_INFO_NUM_LEN);
                    strcpy(dev_conf.pa[tmp].gain, pInfo->gain);
                    node.lvl2 = pa_string;
                    node.lvl3 = pa_name;
                    node.id = tmp + 1;
                    node.name = gain_string;
                    node.type = Wireless_lte_type;
                    node.data = pInfo->gain;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set  %s %s  pa[%d] %s  \n", node.type, node.name, node.id, node.data);
                    cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TX_POWER;
                    cmdList.commandNum++;
                    bzero(&node, sizeof(CNODE_INFO));
 	            }
                else if (tmp >= 7 && tmp < 9 && pInfo->gain[0] != 0)
                {
                    if (tmp == 7 && strcmp(dev_conf.capGsm.gsm1.lowatt, pInfo->gain )!= 0)
                    {
                        node.type = Wireless_gsm_type;
                        bzero(dev_conf.capGsm.gsm1.lowatt, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capGsm.gsm1.lowatt, pInfo->gain);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base1;
                        node.name = Bts_lowatt;
                        node.data = dev_conf.capGsm.gsm1.lowatt;
                        xml_set_nodeInfo(&node);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_PA;
                        cmdList.commandNum++;
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                    } 
                    if (tmp == 8 && strcmp(dev_conf.capGsm.gsm2.lowatt, pInfo->gain )!= 0)
                    {
                        node.type = Wireless_gsm_type;
                        bzero(dev_conf.capGsm.gsm2.lowatt, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capGsm.gsm2.lowatt, pInfo->gain);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base2;
                        node.name = Bts_lowatt;
                        node.data = dev_conf.capGsm.gsm2.lowatt;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM_PA;
                        cmdList.commandNum++;
                    }   
                    bzero(&node, sizeof(CNODE_INFO));
                } 
                else if (tmp == 9 && pInfo->gain[0] != 0
 	         	      && strcmp(dev_conf.capCdma.cdma.dnatt, pInfo->gain )!= 0)
                {
                        node.type = Wireless_cdma_type;
                        bzero(dev_conf.capCdma.cdma.dnatt, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capCdma.cdma.dnatt, pInfo->gain);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base;
                        node.name = Bts_lowatt;
                        node.data = dev_conf.capCdma.cdma.dnatt;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_CDMA;
                        cmdList.commandNum++;
                        bzero(&node, sizeof(CNODE_INFO));
                }
                else if (tmp == 10 && pInfo->gain[0] != 0
 	         	      && strcmp(dev_conf.capWcdma.wcdma.txPower, pInfo->gain )!= 0)
                {
                        node.type = Wireless_wcdma_type;
                        bzero(dev_conf.capWcdma.wcdma.txPower, DEV_INFO_NUM_LEN);
                        strcpy(dev_conf.capWcdma.wcdma.txPower, pInfo->gain);
                        node.lvl2 = Wireless_string;
                        node.lvl3 = wireless_base;
                        node.name = txPower;
                        node.data = dev_conf.capWcdma.wcdma.txPower;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                        cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_WCDMA;
                        cmdList.commandNum++;
                }
                else if (tmp == 11 && pInfo->gain[0] != 0
                        && strcmp(dev_conf.capTdscdma.tdscdma.txPower, pInfo->gain )!= 0)
                {
                    node.type = Wireless_tdscdma_type;
                    bzero(dev_conf.capTdscdma.tdscdma.txPower, DEV_INFO_NUM_LEN);
                    strcpy(dev_conf.capTdscdma.tdscdma.txPower, pInfo->gain);
                    node.lvl2 = Wireless_string;
                    node.lvl3 = wireless_base;
                    node.name = txPower;
                    node.data = dev_conf.capTdscdma.tdscdma.txPower;
                    xml_set_nodeInfo(&node);
                    cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);
                    cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
                    cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_TDSCDMA;
                    cmdList.commandNum++;
                    bzero(&node, sizeof(CNODE_INFO));
                }           
            }
            break;

        case IF_APP_GSM_MANUAL_SNIFER:
            ret = REQUEST_GSM_MANUAL_SNIFFER;
            break;

        case IF_APP_CLEAN_DATA:
            if (strcmp(dev_conf.dev.protocol, ZHONGDUN) != 0)
                ret = REQUEST_CLEAN_DATA;
            else
                ret = REQUEST_CLEAN_FEP_DATA;
            break;

        case IF_APP_REPEAT_DATAUP:
            ret = REQUEST_UPDATE_GET_DATA;
            break;

        case IF_APP_SMS_SWITCH:
            smsInfo = (SMS_INFO *)buf_tmp;
            if (smsInfo->enable[0] != 0
                && strcmp(dev_conf.sms.enable, smsInfo->enable) != 0) 
			{
                bzero(dev_conf.sms.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.sms.enable, smsInfo->enable);
                node.lvl2 = sms_string;
                node.name = en_string;
                node.data = smsInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SMS;
            }
            break;

        case IF_APP_SMS_MAIN_SWITCH:
            smsInfo = (SMS_INFO *)buf_tmp;
            if (smsInfo->msgEnable[0] != 0
                && strcmp(dev_conf.sms.msgEnable, smsInfo->msgEnable) != 0) 
			{
                bzero(dev_conf.sms.msgEnable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.sms.msgEnable, smsInfo->msgEnable);
                node.lvl2 = sms_string;
                node.name = sms_msg;
                node.data = smsInfo->msgEnable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SMS_MSG;
            }
            break;           

        case IF_APP_UPDATA_SWITCH:
            sInfo = (SRV_INFO *)buf_tmp;
            if (sInfo->enable[0] != 0) 
			{
                bzero(dev_conf.data.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.data.enable, sInfo->enable);
                node.lvl2 = DataSrv_strig;
                node.name = en_string;
                node.data = sInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_DATA_EN;
                if (strcmp(dev_conf.dev.protocol, KUANGUANG) == 0 || strcmp(dev_conf.dev.protocol, CAIPINNEW) == 0)
                {
                    if (sInfo->enable[0] == '1')
                        ret = REQUEST_FTP_REPORT_DATA_ON;
                    else
                        ret = REQUEST_FTP_REPORT_DATA_OFF;
                }
            }

            break;

       case IF_APP_SR_GPSINFO:
            ret = REQUEST_SR_GPSINFO;
			break;

       case IF_APP_SR_DEV_VERSION:
           ret = REQUEST_GET_SYS_INFO;
           break;


        case IF_APP_REBOOT:
            ret = REQUEST_UPDATA_REBOOT;
            break;

        case IF_APP_SMS_SND:
            ret = REQUEST_UPDATA_SMS_SND;
            break;

        case IF_APP_TIME_SYNC:
            ret = REQUEST_UPDATA_TIME;
            break;

        case IF_APP_SLEEP:
            ret = REQUEST_UPDATA_SLEEP;
            break;

        case IF_APP_WAKEUP:
            ret = REQUEST_UPDATA_WAKEUP;
            break;

        case IF_APP_FACTORY_DEAULT:
            ret = REQUEST_FACTORY_DEFAULT;
            break;

        case IF_APP_SR_BBU_VERSION:
            if (atoi(buf_tmp) == 8 || atoi(buf_tmp) == 9)
            {
                ret = REQUEST_GSM_GET_VERSION;
            }
            else if (atoi(buf_tmp) < 8)
            {
                ret = REQUEST_EUTRAN_SOFTWARE_VERSION;
            }
            break;

        case IF_APP_SMS_KEY:
            smsInfo = (SMS_INFO *)buf_tmp;
            if (smsInfo->smsKey[0] != 0
                && strcmp(dev_conf.sms.smsKey, smsInfo->smsKey) != 0) 
			{
                bzero(dev_conf.sms.smsKey, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.sms.smsKey, smsInfo->smsKey);
                node.lvl2 = sms_string;
                node.name = sms_key;
                node.data = smsInfo->smsKey;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SMS_KEY;
            }
            break;
        case IF_APP_SAVE_TIME:
            ftpInfo = (FTP_INFO *)buf_tmp;
            if (ftpInfo->ftpuptime[0] != 0)
            {
                node.lvl2 = ftpStr;
                node.name = ftpuptimeStr;
                node.data = ftpInfo->ftpuptime;
                cli_app_log(CLI_LOG_DEFAULT, "save ftp uptime is %s \n", ftpInfo->ftpuptime);
                xml_set_nodeInfo(&node);
            }
            if (ftpInfo->ftpSingleFileNum[0] != 0)
            {
                node.lvl2 = ftpStr;
                node.name = ftpSingleFileNumStr;
                node.data = ftpInfo->ftpSingleFileNum;
                cli_app_log(CLI_LOG_DEFAULT, "save ftp ftpSingleFileNum is %s \n", ftpInfo->ftpSingleFileNum);
                xml_set_nodeInfo(&node);
            }
            if (ftpInfo->ftpCompressFileNum[0] != 0)
            {
                node.lvl2 = ftpStr;
                node.name = ftpCompressFileNumStr;
                node.data = ftpInfo->ftpCompressFileNum;
                cli_app_log(CLI_LOG_DEFAULT, "save ftp ftpCompressFileNum is %s \n", ftpInfo->ftpCompressFileNum);
                xml_set_nodeInfo(&node);
            }

            break;

        case IF_APP_STORAGE_SAVETIME:
            stInfo = (STORAGE_INFO *)buf_tmp;
            if (stInfo->peroid[0] != 0
                && strcmp(dev_conf.storage.peroid, stInfo->peroid) != 0) 
			{
                bzero(dev_conf.storage.peroid, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.storage.peroid, stInfo->peroid);
                node.lvl2 = storage_string;
                node.name = save_time;
                node.data = stInfo->peroid;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_STORAGE;
            }
            break;

        case IF_APP_CFG_RESTART_TIME:
            restartInfo = (RESTART_INFO *)buf_tmp;
            if (restartInfo->enable[0] != 0
                && strcmp(dev_conf.restart.enable, restartInfo->enable) != 0) 
			{
                bzero(dev_conf.restart.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.restart.enable, restartInfo->enable);
                node.lvl2 = restart_string;
                node.name = en_string;
                node.data = restartInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SYS_RBEOOT;
            }
            if (restartInfo->hour[0] != 0
                && strcmp(dev_conf.restart.hour, restartInfo->hour) != 0) 
			{
                bzero(dev_conf.restart.hour, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.restart.hour, restartInfo->hour);
                node.lvl2 = restart_string;
                node.name = hourStr;
                node.data = restartInfo->hour;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SYS_RBEOOT;
            }
            if (restartInfo->min[0] != 0
                && strcmp(dev_conf.restart.min, restartInfo->min) != 0) 
			{
                bzero(dev_conf.restart.min, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.restart.min, restartInfo->min);
                node.lvl2 = restart_string;
                node.name = minuteStr;
                node.data = restartInfo->min;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_WARNING, "set %s  %s \n", node.name, node.data);
                ret = REQUEST_UPDATA_SYS_RBEOOT;
            }

            break;
            
        case IF_APP_SR_RESTART_TIME:
            ret = REQUEST_SR_RESTART_TIME;
            break;

        case IF_APP_SOFTWARE_UPDATE:
            {
                system(cpXmlFile);
            }
            ret = REQUEST_SOFTWARE_UPDATA;
            break;

        case IF_APP_RESTART_LTE_BBU:
            ret = REQUEST_EUTRAN_BBU_REBOOT;
            break;

        case IF_APP_RESTART_GSM_BBU:
            ret = REQUEST_GSM_REBOOT;
            break;

        case IF_APP_RESTART_CDMA_BBU:
            ret = REQUEST_CDMA_REBOOT;
            break;

        case IF_APP_RESTART_WCDMA_BBU:
            ret = REQUEST_WCDMA_REBOOT;
            break;

        case IF_APP_RESTART_TDSCDMA_BBU:
            ret = REQUEST_TDSCDMA_REBOOT;
            break;

        case IF_APP_SR_FTP_INFO:
            ret = REQUEST_SR_FTP_INFO;
            break;
        
        case IF_APP_ADD_BLACKLIST:
            ret = REQUEST_ADD_BLACKLIST;
            break;

        case IF_APP_DEL_BLACKLIST:
            ret = REQUEST_DEL_BLACKLIST;
            break;

        case IF_APP_SR_BLACKLIST:
            ret = REQUEST_SR_BLACKLIST;
            break;

        case IF_APP_PA_POWER_ON:
            ret = REQUEST_PA_POWER_ON;
            break;
        
        case IF_APP_PA_POWER_OFF:
            ret = REQUEST_PA_POWER_OFF;
            break;

        case IF_APP_SR_X86_CFG:
            ret = REQUEST_SR_X86_CFG;
            break;
        case IF_APP_SR_X86_CURRENT_TIME:
            ret = REQUEST_SR_X86_CURRENT_TIME;
            break;
        
        case IF_APP_SR_NTP_SERVER:
            ret = REQUEST_SR_NTP_SERVER;
            break;

        case IF_APP_SR_GSM_SNIFFER_TIME:
            ret = REQUEST_SR_GSM_SNIFFER_TIME;
            break;
        
        case IF_APP_SR_TIME_REPEAT:
            ret = REQUEST_SR_TIME_REPEAT;
            break;

        case IF_APP_SR_ONE_RECORD:
            ret = REQUEST_SR_ONE_RECORD;
            break;

        case IF_APP_SR_50_DAY_RECORD:
            ret = REQUEST_SR_50_DAY_RECORD;
            break;

        case IF_APP_SR_ONE_DAY_RECORD:
            ret = REQUEST_SR_ONE_DAY_RECORD;
            break;
        
        case IF_APP_SR_RECORD_BY_SEQ:
            ret = REQUEST_SR_RECORD_BY_SEQ;
            break;

        case IF_APP_SR_RECORD_END:
            ret = REQUEST_SR_RECORD_END;
            break;

        case IF_APP_SR_TAC_CYCLE:
            ret = REQUEST_SR_TAC_CYCLE;
            break;

        case IF_APP_REBOOT_DEVICE:
            ret = REQUEST_REBOOT_DEVICE;
            break;

        case IF_APP_SEND_UPGRADE_PACKET:
            ret = REQUEST_SEND_UPGRADE_PACKET;
            break;

        case IF_APP_SEND_PACKET_END:
            ret = REQUEST_UPGRADE_X86;
            break;

        case IF_APP_LTE_MANUAL_SNIFFER:
            if (dev_conf.capLte.isSupported[0] == '1')
            {
                I32 i = 0;
                for (; i < LTE_CELL_NUM; i++)
                {
                    if (atoi(dev_conf.capLte.lte[i].enable) == 1)
                    {
                        cmdList.commandList[cmdList.commandNum].cellId = (i + 1);
                        cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_SHUTDOWN_TX_POWER;
                        cmdList.commandNum++;
                    }
                }
                cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_LTE_SNIFFER;
                cmdList.commandNum++;
                cli_app_log(CLI_LOG_NOTICE, "shutdown all power before start LTE sniffer \n");
            }  
            break;

        case IF_APP_WCDMA_MANUAL_SNIFFER:
            if (dev_conf.capWcdma.isSupported[0] == '1')
            {
                cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_SHUTDOWN_WCDMA_POWER;
                cmdList.commandNum++;
                cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_WCDMA_SNIFFER;
                cmdList.commandNum++;
                cli_app_log(CLI_LOG_NOTICE, "shutdown wcdma power before WCDMA sniffer \n");
            }
            break;
            
        case IF_APP_REMOTE_SSH_ON:
            ret = REQUEST_REMOTE_SSH_ON;
            break;
            
        case IF_APP_REMOTE_SSH_OFF:
            ret = REQUEST_REMOTE_SSH_OFF;
            break;   
		case IF_APP_GSM_SNF_SWITCH:
			snfInfo = (SNF_INFO *)buf_tmp;
			node.type = Wireless_gsm_type;
			if (snfInfo->enable[0] != 0 && strcmp(dev_conf.snfGsm.enable, snfInfo->enable) != 0) 
			{
                bzero(dev_conf.snfGsm.enable, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.snfGsm.enable, snfInfo->enable);
                node.lvl2 = sniffer_string;
                node.name = en_string;
                node.data = snfInfo->enable;
                xml_set_nodeInfo(&node);
                cli_app_log(CLI_LOG_INFO, "set %s %s \n", node.name, node.data);				
			}
			
		case IF_APP_BBU_SCAN_ON:
			ret = REQUEST_EUTRAN_BBU_SCAN_ON;
			break;

		case IF_APP_BBU_SCAN_OFF:
			ret = REQUEST_EUTRAN_BBU_SCAN_OFF;
			break;

		case IF_APP_CFG_ALL_BBU_CONFIG:
			{
				wInfo = (WIRELESS_LTE_INFO *)buf_tmp;
				for (tmp = 0; tmp < 7; tmp++)
				{
					gInfo = &wInfo->lte[tmp];
					tInfo = &dev_conf.capLte.lte[tmp];
					node.lvl3 = wireless_base;
					node.id = (tmp + 1) ;
					node.type = Wireless_lte_type;		
					node.lvl2 = Wireless_string;
					node.lvl4 = Bts_cell;
					ret = REQUEST_UPDATA_NONE;              
					if (gInfo->gpsTmDelay[0] != 0 && strcmp(tInfo->gpsTmDelay, gInfo->gpsTmDelay) != 0) 
					{
						bzero(tInfo->gpsTmDelay, DEV_INFO_NUM_LEN);
						strcpy(tInfo->gpsTmDelay, gInfo->gpsTmDelay);
						node.name = gpsTmDelay;
						node.data = tInfo->gpsTmDelay;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->IsMeasureEnable[0] != 0 && strcmp(tInfo->IsMeasureEnable, gInfo->IsMeasureEnable) != 0) 
					{
						bzero(tInfo->IsMeasureEnable, DEV_INFO_NUM_LEN);
						strcpy(tInfo->IsMeasureEnable, gInfo->IsMeasureEnable);
						node.name = IsMeasureEnable;
						node.data = tInfo->IsMeasureEnable;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->bandWidth[0] != 0 && strcmp(tInfo->bandWidth, gInfo->bandWidth) != 0) 
					{
						bzero(tInfo->bandWidth, DEV_INFO_NUM_LEN);
						strcpy(tInfo->bandWidth, gInfo->bandWidth);
						node.name = bandWidth;
						node.data = tInfo->bandWidth;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->syncMode[0] != 0 && strcmp(tInfo->syncMode, gInfo->syncMode) != 0) 
					{
						bzero(tInfo->syncMode, DEV_INFO_NUM_LEN);
						strcpy(tInfo->syncMode, gInfo->syncMode);
						node.name = syncMode;
						node.data = tInfo->syncMode;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_REBOOT;
						cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->isSaveFs[0] != 0 && strcmp(tInfo->isSaveFs, gInfo->isSaveFs) != 0) 
					{
						bzero(tInfo->isSaveFs, DEV_INFO_NUM_LEN);
						strcpy(tInfo->isSaveFs, gInfo->isSaveFs);
						node.name = isSaveFs;
						node.data = tInfo->isSaveFs;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_REBOOT;
						cli_app_log(CLI_LOG_NOTICE, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->bandWidth[0] != 0 && strcmp(tInfo->bandWidth, gInfo->bandWidth) != 0) 
					{

						bzero(tInfo->bandWidth, DEV_INFO_NUM_LEN);
						strcpy(tInfo->bandWidth, gInfo->bandWidth);
						node.name = bandWidth;
						node.data = tInfo->bandWidth;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}  
					if (gInfo->band[0] != 0 && strcmp(tInfo->band, gInfo->band) != 0) 
					{
						bzero(tInfo->band, DEV_INFO_NUM_LEN);
						strcpy(tInfo->band, gInfo->band);
						node.name = band;
						node.data = tInfo->band;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}	
					if (gInfo->plmnid[0] != 0 && strcmp(tInfo->plmnid, gInfo->plmnid) != 0) 
					{
						bzero(tInfo->plmnid, DEV_INFO_PAR_LEN);
						strcpy(tInfo->plmnid, gInfo->plmnid);
						node.name = plmnid;
						node.data = tInfo->plmnid;
						xml_set_nodeInfo(&node);
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
					}
					if (gInfo->tac[0] != 0 && strcmp(tInfo->tac, gInfo->tac) != 0) 
					{
						bzero(tInfo->tac, DEV_INFO_NUM_LEN);
						strcpy(tInfo->tac, gInfo->tac);
						node.name = tac;
						node.data = tInfo->tac;
						xml_set_nodeInfo(&node);
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
					}
					if (gInfo->ul_earfcn[0] != 0 && strcmp(tInfo->ul_earfcn, gInfo->ul_earfcn) != 0) 
					{

						bzero(tInfo->ul_earfcn, DEV_INFO_NUM_LEN);
						strcpy(tInfo->ul_earfcn, gInfo->ul_earfcn);
						node.name = ul_earfcn;
						node.data = tInfo->ul_earfcn;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);                      
					}
					if (gInfo->dl_earfcn[0] != 0 && strcmp(tInfo->dl_earfcn, gInfo->dl_earfcn) != 0) 
					{			
						bzero(tInfo->dl_earfcn, DEV_INFO_NUM_LEN);
						strcpy(tInfo->dl_earfcn, gInfo->dl_earfcn);
						node.name = dl_earfcn;
						node.data = tInfo->dl_earfcn;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);                      
					}
					if (gInfo->pci[0] != 0 && strcmp(tInfo->pci, gInfo->pci) != 0) 
					{

						bzero(tInfo->pci, DEV_INFO_NUM_LEN);
						strcpy(tInfo->pci, gInfo->pci);
						node.name = pci;
						node.data = tInfo->pci;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->neiborcell[0] != 0 && strcmp(tInfo->neiborcell, gInfo->neiborcell) != 0) 
					{
						bzero(tInfo->neiborcell, DEV_INFO_PAR_LEN);
						strcpy(tInfo->neiborcell, gInfo->neiborcell);
						node.name = neiborcell;
						node.data = tInfo->neiborcell;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT;
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->abnorfreq[0] != 0 && strcmp(tInfo->abnorfreq, gInfo->abnorfreq) != 0) 
					{
						bzero(tInfo->abnorfreq, DEV_INFO_PAR_LEN);
						strcpy(tInfo->abnorfreq, gInfo->abnorfreq);
						node.name = abnorfreq;
						node.data = tInfo->abnorfreq;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT; 
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}
					if (gInfo->freqList[0] != 0 && strcmp(tInfo->freqList, gInfo->freqList) != 0) 
					{
						bzero(tInfo->freqList, DEV_INFO_PAR_LEN);
						strcpy(tInfo->freqList, gInfo->freqList);
						node.name = freqListStr;
						node.data = tInfo->freqList;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT; 
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
					}		
					if (gInfo->ctFreqList[0] != 0 && strcmp(tInfo->ctFreqList, gInfo->ctFreqList) != 0) 
					{
						bzero(tInfo->ctFreqList, DEV_INFO_PAR_LEN);
						strcpy(tInfo->ctFreqList, gInfo->ctFreqList);
						node.name = ctFreqListStr;
						node.data = tInfo->ctFreqList;
						xml_set_nodeInfo(&node);
						ret = REQUEST_EUTRAN_BBU_REBOOT; 
						cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                    }	

                    if (gInfo->minRxLev[0] != 0 && strcmp(tInfo->minRxLev, gInfo->minRxLev) != 0) 
                    {
                        bzero(tInfo->minRxLev, DEV_INFO_NUM_LEN);
                        strcpy(tInfo->minRxLev, gInfo->minRxLev);
                        node.name = minRxLevStr;
                        node.data = tInfo->minRxLev;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                        ret = REQUEST_EUTRAN_UPDATA_CELL;
                    }
                    if (gInfo->minRxLevOffset[0] != 0 && strcmp(tInfo->minRxLevOffset, gInfo->minRxLevOffset) != 0) 
                    {
                        bzero(tInfo->minRxLevOffset, DEV_INFO_NUM_LEN);
                        strcpy(tInfo->minRxLevOffset, gInfo->minRxLevOffset);
                        node.name = minRxLevOffsetStr;
                        node.data = tInfo->minRxLevOffset;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                        ret = REQUEST_EUTRAN_UPDATA_CELL;
                    }
                    if (gInfo->configMode[0] != 0 && strcmp(tInfo->configMode, gInfo->configMode) != 0) 
                    {
                        bzero(tInfo->configMode, DEV_INFO_NUM_LEN);
                        strcpy(tInfo->configMode, gInfo->configMode);
                        node.name = configModeStr;
                        node.data = tInfo->configMode;
                        xml_set_nodeInfo(&node);
                        cli_app_log(CLI_LOG_INFO, "set bbu[%d] %s %s \n", node.id, node.name, node.data);
                        ret = REQUEST_EUTRAN_UPDATA_CELL;
                    }
					if (ret == REQUEST_EUTRAN_BBU_REBOOT)
					{
						cmdList.commandList[cmdList.commandNum].cellId = (tmp + 1);
						cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_BBU1_INIT_CONFIG + tmp;
						cmdList.commandNum++;
					}
				}

				w1Info =  (WIRELESS_GSM_INFO *)(buf_tmp + sizeof(WIRELESS_LTE_INFO));
				bzero(&node, sizeof(CNODE_INFO));
				lvl3 = NULL;
				for (tmp = 0; tmp < 2; tmp++)
				{
					node.type = Wireless_gsm_type;
					if (tmp == 0) 
					{
						g1Info = &w1Info->gsm1;
						t1Info = &dev_conf.capGsm.gsm1;
						lvl3 = wireless_base1;
					} 
					else 
					{
						g1Info = &w1Info->gsm2;
						t1Info = &dev_conf.capGsm.gsm2;
						lvl3 = wireless_base2;
											
					}
 					cli_app_log(CLI_LOG_INFO, "bcc is %s band %s \n", g1Info->bcc, g1Info->band);
					ret = REQUEST_UPDATA_NONE;
					if (g1Info->band[0] != 0 && strcmp(t1Info->band, g1Info->band) != 0) 
					{
						bzero(t1Info->band, DEV_INFO_NUM_LEN);
						strcpy(t1Info->band, g1Info->band);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_band;
						node.data = t1Info->band;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->bcc[0] != 0 && strcmp(t1Info->bcc, g1Info->bcc) != 0) 
					{
						bzero(t1Info->bcc, DEV_INFO_NUM_LEN);
						strcpy(t1Info->bcc, g1Info->bcc);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_BCC;
						node.data = t1Info->bcc;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->mcc[0] != 0 && strcmp(t1Info->mcc, g1Info->mcc) != 0) 
					{
						bzero(t1Info->mcc, DEV_INFO_NUM_LEN);
						strcpy(t1Info->mcc, g1Info->mcc);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_MCC;
						node.data = t1Info->mcc;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->mnc[0] != 0 && strcmp(t1Info->mnc, g1Info->mnc) != 0) 
					{
						bzero(t1Info->mnc, DEV_INFO_NUM_LEN);
						strcpy(t1Info->mnc, g1Info->mnc);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_MNC;
						node.data = t1Info->mnc;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->lac[0] != 0 && strcmp(t1Info->lac, g1Info->lac) != 0) 
					{
						bzero(t1Info->lac, DEV_INFO_NUM_LEN);
						strcpy(t1Info->lac, g1Info->lac);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_LAC;
						node.data = t1Info->lac;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->workMode[0] != 0 && strcmp(t1Info->workMode, g1Info->workMode) != 0) 
					{
						bzero(t1Info->workMode, DEV_INFO_NUM_LEN);
						strcpy(t1Info->workMode, g1Info->workMode);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_workMode;
						node.data = t1Info->workMode;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->configMode[0] != 0 && strcmp(t1Info->configMode, g1Info->configMode) != 0) 
					{
						bzero(t1Info->configMode, DEV_INFO_NUM_LEN);
						strcpy(t1Info->configMode, g1Info->configMode);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_configMode;
						node.data = t1Info->configMode;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->captime[0] != 0 && strcmp(t1Info->captime, g1Info->captime) != 0) 
					{
						bzero(t1Info->captime, DEV_INFO_NUM_LEN);
						strcpy(t1Info->captime, g1Info->captime);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = captime;
						node.data = t1Info->captime;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->thld[0] != 0 && strcmp(t1Info->thld, g1Info->thld) != 0) 
					{
						bzero(t1Info->thld, DEV_INFO_NUM_LEN);
						strcpy(t1Info->thld, g1Info->thld);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_THLD ;
						node.data = t1Info->thld;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->lowatt[0] != 0 && strcmp(t1Info->lowatt, g1Info->lowatt) != 0) 
					{
						bzero(t1Info->lowatt, DEV_INFO_NUM_LEN);
						strcpy(t1Info->lowatt, g1Info->lowatt);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_lowatt ;
						node.data = t1Info->lowatt;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->upatt[0] != 0 && strcmp(t1Info->upatt, g1Info->upatt) != 0) 
					{
						bzero(t1Info->upatt, DEV_INFO_NUM_LEN);
						strcpy(t1Info->upatt, g1Info->upatt);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_upatt ;
						node.data = t1Info->upatt;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->cnum[0] != 0 && strcmp(t1Info->cnum, g1Info->cnum) != 0) 
					{
						bzero(t1Info->cnum, DEV_INFO_NUM_LEN);
						strcpy(t1Info->cnum, g1Info->cnum);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_cnum ;
						node.data = t1Info->cnum;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (g1Info->cro[0] != 0 && strcmp(t1Info->cro, g1Info->cro) != 0) 
					{
						bzero(t1Info->cro, DEV_INFO_NUM_LEN);
						strcpy(t1Info->cro, g1Info->cro);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_cro;
						node.data = t1Info->cro;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}

					if (g1Info->startFreq900[0] != 0 && strcmp(t1Info->startFreq900, g1Info->startFreq900) != 0) 
					{
						bzero(t1Info->startFreq900, DEV_INFO_NUM_LEN);
						strcpy(t1Info->startFreq900, g1Info->startFreq900);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_startFreq900 ;
						node.data = t1Info->startFreq900;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}

					if (g1Info->endFreq900[0] != 0 && strcmp(t1Info->endFreq900, g1Info->endFreq900) != 0) 
					{
						bzero(t1Info->endFreq900, DEV_INFO_NUM_LEN);
						strcpy(t1Info->endFreq900, g1Info->endFreq900);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_endFreq900 ;
						node.data = t1Info->endFreq900;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}

					if (g1Info->startFreq1800[0] != 0 && strcmp(t1Info->startFreq1800, g1Info->startFreq1800) != 0) 
					{
						bzero(t1Info->startFreq1800, DEV_INFO_NUM_LEN);
						strcpy(t1Info->startFreq1800, g1Info->startFreq1800);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_startFreq1800 ;
						node.data = t1Info->startFreq1800;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}

					if (g1Info->endFreq1800[0] != 0 && strcmp(t1Info->endFreq1800, g1Info->endFreq1800) != 0) 
					{
						bzero(t1Info->endFreq1800, DEV_INFO_NUM_LEN);
						strcpy(t1Info->endFreq1800, g1Info->endFreq1800);
						node.lvl2 = Wireless_string;
						node.lvl3 = lvl3;
						node.name = Bts_endFreq1800 ;
						node.data = t1Info->endFreq1800;
						xml_set_nodeInfo(&node);
						ret = REQUEST_UPDATA_GSM2;
					}
					if (ret == REQUEST_UPDATA_GSM2)
					{	
						if (tmp == 0)
						{
							cmdList.commandList[cmdList.commandNum].cellId = 8;
							cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM1;
							cmdList.commandNum++;
						}
						else
						{
							cmdList.commandList[cmdList.commandNum].cellId = 9;
							cmdList.commandList[cmdList.commandNum].cmdId = REQUEST_UPDATA_GSM2;
							cmdList.commandNum++;
						}
					}

				}
				
			}			
			break;
			
		case IF_APP_SR_ALL_BBU_CONFIG:
            ret = REQUEST_SR_ALL_BBU_CONFIG;
            break;
		case IF_APP_TDD_LOCATION_ON:
			ret = REQUEST_TDD_LOCATION_ON;
			break;

		case IF_APP_TDD_LOCATION_OFF:
			ret = REQUEST_TDD_LOCATION_OFF;
			break;

		case IF_APP_FDD_LOCATION_ON:
			ret = REQUEST_FDD_LOCATION_ON;
			break;
		case IF_APP_FDD_LOCATION_OFF:
			ret = REQUEST_FDD_LOCATION_OFF;
			break;

		case IF_APP_FDD_MODE:
			dInfo = (DEV_INFO *)buf_tmp;
            if (dInfo->devtype[0] != 0
                && strcmp(dev_conf.dev.devtype, dInfo->devtype) != 0) 
			{
                bzero(dev_conf.dev.devtype, DEV_INFO_NUM_LEN);
                strcpy(dev_conf.dev.devtype, dInfo->devtype);

                node.name = "DevType";
                node.data = dInfo->devtype;
                xml_set_nodeInfo(&node);
            }
			ret = REQUEST_FDD_MODE;
			break;

        case IF_APP_DEVICE_USAGE:
            ret = REQUEST_SR_DEVICE_USAGE;
            break;
			
		case IF_APP_SR_HW_ID:
			ret = REQUEST_SR_HW_ID;
			break;

		case IF_APP_SR_SERVER_RESART_SNF:
			ret = REQUEST_SR_SERVER_RESART_SNF;

		case IF_APP_SR_BOARDCARD_INFO:
			ret = REQUEST_SR_BOARDCARD_INFO;
			
        default:
            break;
    }
    return ret;
}

#ifdef IF_APP_UNIT_TEST
void xml_show_conf(void)
{
    I32 i;
    I32 len;
	I32 dev_len;
    I32 size;
    I8 *tmp = (I8 *) & dev_conf;

    char *dev_name[] = {
"DevNumber", "DevName", "TypeModel", "devType", "PhoneNumber", "DevAddresss", "Longitude", "Latitude", "Height", "gspEnable",  "uploadMode",
"workMode",  "workPeriod",  "powerOffTime",
 "WirelessInfo Type=GSM.Enable", "WirelessInfo Type=GSM.reDetectMinuts", "bts1.band", "bts1.bcc", "bts1.mcc", "bts1.mnc", "bts1.lac", "bts1.neitosend", "bts1.rssi", "bts1.thredelta", "bts1.captime", "bts1.lowatt", "bts1.upatt", "bts1.cnum", "bts1.configmode", "bts1.workmode","bts1.start900", "bts1.end900", "bts1.start1800", "bts1.end1800", "bts1.offset", "bts2.band", "bts2.bcc", "bts2.mcc", "bts2.mnc", "bts2.lac", "bts2.neitosend", "bts2.rssi", "bts2.thredelta", "bts2.captime", "bts2.lowatt", "bts2.upatt", "bts2.cnum", "bts2.configmode", "bts2.workmode", "bts2.start900", "bts2.end900", "bts2.start1800", "bts2.end1800", "bts2.offset", 
"WirelessInfo Type=LTE.Enable",  "WirelessInfo Type=LTE.TacCycle" ,"cell1.enable", "cell1.desc", "cell1.operator", "cell1.band", "cell1.bandWidth", "cell1.IsMeasureEnable", "cell1.syncMode", "cell1.gpsTmDelay", "cell1.isSaveFs", "cell1.ul-earfcn",  "cell1.dl-earfcn",  "cell1.plmnid", "cell1.tac", "cell1.neiborcell", "cell1.abnorfreq",
"cell2.enable", "cell2.desc", "cell2.operator", "cell2.band", "cell2.bandWidth", "cell2.IsMeasureEnable", "cell2.syncMode", "cell2.gpsTmDelay", "cell2.isSaveFs", "cell2.ul-earfcn", "cell2.dl-earfcn",  "cell2.plmnid", "cell2.tac", "cell2.neiborcell", "cell2.abnorfreq",
"cell3.enable", "cell3.desc", "cell3.operator", "cell3.band", "cell3.bandWidth", "cell3.IsMeasureEnable", "cell3.syncMode", "cell3.gpsTmDelay", "cell3.isSaveFs", "cell3.ul-earfcn", "cell3.dl-earfcn",  "cell3.plmnid", "cell3.tac", "cell3.neiborcell", "cell3.abnorfreq",
"cell4.enable", "cell4.desc", "cell4.operator", "cell4.band", "cell4.bandWidth", "cell4.IsMeasureEnable", "cell4.syncMode", "cell4.gpsTmDelay", "cell4.isSaveFs", "cell4.ul-earfcn", "cell4.dl-earfcn",  "cell4.plmnid", "cell4.tac", "cell4.neiborcell", "cell4.abnorfreq",
"cell5.enable", "cell5.desc", "cell5.operator", "cell5.band", "cell5.bandWidth", "cell5.IsMeasureEnable", "cell5.syncMode", "cell5.gpsTmDelay", "cell5.isSaveFs", "cell5.ul-earfcn", "cell5.dl-earfcn",  "cell5.plmnid", "cell5.tac", "cell5.neiborcell", "cell5.abnorfreq",
"cell6.enable", "cell6.desc", "cell6.operator", "cell6.band", "cell6.bandWidth", "cell6.IsMeasureEnable", "cell6.syncMode", "cell6.gpsTmDelay", "cell6.isSaveFs", "cell6.ul-earfcn", "cell6.dl-earfcn",  "cell6.plmnid", "cell6.tac", "cell6.neiborcell", "cell6.abnorfreq",
"cell7.enable", "cell7.desc", "cell7.operator", "cell7.band", "cell7.bandWidth", "cell7.IsMeasureEnable", "cell7.syncMode", "cell7.gpsTmDelay", "cell7.isSaveFs", "cell7.ul-earfcn", "cell7.dl-earfcn",  "cell7.plmnid", "cell7.tac", "cell7.neiborcell", "cell7.abnorfreq",
 "WirelessInfo Type=CDMA.Enable", "WirelessInfo Type=CSMA.reDetectMinuts", "bcc", "mcc", "mnc", "sid", "nid", "pn", "bsid", "regnum", "captime", "lowatt", "upatt", "workModel","scanTime","scanPeriod","ResetModel","freq1", "workmode1", "scantime1", "scancaptime1", "neibor1freq1", "neibor2freq1","neibor3freq1","neibor4freq1","freq2", "workmode2", "scantime2", "scancaptime2", "neibor1freq2", "neibor2freq2", "neibor3freq2", "neibor4freq2","freq3", "workmode3", "scantime3", "scancaptime3", "beibor1freq3", "beibor2freq3","beibor3freq3","beibor4freq3","freq4", "workmode4", "scantime4", "scancaptime4", "neibor1freq4", "neibor2freq4", "neibor3freq4", "neibor4freq4",

"PA1Info.Enable", "PA1Info.gain","PA2Info.Enable", "PA2Info.gain", "PA3Info.Enable", "PA3Info.gain", "PA4Info.Enable", "PA4Info.gain", "PA5Info.Enable", "PA5Info.gain", "PA6Info.Enable", "PA6Info.gain", "PA7Info.Enable", "PA7Info.gain", "PA8Info.Enable", "PA8Info.gain", "PA9Info.Enable", "PA9Info.gain",
"SMS.Enable","SMS.MsgEnable", "SMS.KEY",
"disable_auth", "cer_file","AuthServer.SrvAddress", "AuthServer.Port",  "AuthServer.openport", "AuthServer.HeartBeat",  "AuthSever.intvl", "AuthServer.cycle", "AuthServer.Enable",
 "DevManageServer.disable_auth", "DevManageServer.cer_file", "DevManageServer.SrvAddress", "DevManageServer.Port",  "DevManageServer.openport", "DevManageServer.HeartBeat",  "DevManageServer.intvl", "DevManageServer.cycle",
"UpDataServer.disable_auth", "UpDataServer.cer_file", "UpDataServer.SrvAddress", "UpDataServer.Port",  "UpDataServer.openport", "UpDataServer.HeartBeat",  "UpDataServer.intvl", "UpDataServer.cycle",
"Sniffer.Enable", "Sniffer.BccMode", "Sniffer.IsAuto", "Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second", "Sniffer.Cycle",
"Sniffer.Enable", "sniffer.fscope", "Sniffer.BccMode", "Sniffer.IsAuto", "Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second","Sniffer.Hour", "Sniffer.Minute", "Sniffer.Second", "Sniffer.Cycle",
"Storage.SaveTime","restart_enable"
 
};

    size = sizeof(DEV_CONF);
    i = 0;
    len = 0;
	dev_len = 0;
//	xml_get_devConf(&dev_conf, &misc_conf);

    cli_app_log(CLI_LOG_CRITICAL, "xml config is: \n");
    while (i < size) 
	{
        if (tmp[i] == 0) 
		{
            i++;
            continue;
        }
        len = strlen(&tmp[i]);	
   
  	    cli_app_log(CLI_LOG_CRITICAL, "%s : %s\n", dev_name[dev_len], &tmp[i]);
           
		dev_len++;
        i += len;
    }   
    cli_app_log(CLI_LOG_INFO, "show xml config end>>>>>>>>>>>>>>>>>>\n");

	if ( (atoi(dev_conf.auth.disable_auth)) != 0)
	{
		strcpy(dev_conf.mng.port, dev_conf.mng.open_port);
		
		strcpy(dev_conf.data.port, dev_conf.data.open_port);

	}


}
#endif


I32 CreateKuanGuangXmlFile(KAUNGAUNG_FTP *kaunGuangFtp)
{
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
	root = xmlNewNode(NULL, BAD_CAST"MESSAGE");
    xmlDocSetRootElement(doc, root);
	for (; i < kaunGuangFtp->fileNum; i++)
	{
		node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
		xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
		xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
		node2 = xmlNewNode(NULL, BAD_CAST"DATA");
		node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
		xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
		node4 = xmlNewNode(NULL, BAD_CAST"DATA");
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"1010032");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符（缺少值时默认制表符\t）");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"1010033");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符（缺少值时默认制表符\n）");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"WA_SOURCE_EW_1001");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
		xmlAddChild(node4, node5);		
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"145");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"厂家结构组织代码");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"1010038");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行，可选项，不填写默认为第1行");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"1010039");
		xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"可选项，默认UTF-8，BCP文件编码格式（采用不带格式的编码方式，如：UTF-8 无 BOM）");
		xmlAddChild(node4, node5);
		
		node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
		node6 = xmlNewNode(NULL, BAD_CAST"DATA");
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST"./");
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(kaunGuangFtp->ftpFiles[i].fileName)));
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
		char num[DEV_INFO_NUM_LEN] = {0};
		sprintf(num, "%d", kaunGuangFtp->ftpFiles[i].fileRows);
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
		xmlAddChild(node6, node7);
		xmlAddChild(node5, node6);
		xmlAddChild(node4, node5);
		
		node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
		node6 = xmlNewNode(NULL, BAD_CAST"DATA");
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020004");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETBAR_WACODE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所编码");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"B020007");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"IMSI");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C050001");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"IMEI");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C040002");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"MAC地址");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010014");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集时间");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"R010001");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"类型");
		xmlAddChild(node6, node7);
		xmlAddChild(node5, node6);
		xmlAddChild(node4, node5);
		xmlAddChild(node3, node4);
		xmlAddChild(node2, node3);
		xmlAddChild(node1, node2);
		xmlAddChild(root, node1);
	}
    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
  //  xmlCleanupParser();
   // xmlMemoryDump();	
	return IF_APP_OK;
}


I32 CreateFengHuoDataXmlFile(KAUNGAUNG_FTP *fengHuoFtpData)
{
    
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
	root = xmlNewNode(NULL, BAD_CAST"MESSAGE");	
	xmlDocSetRootElement(doc, root);
	for (; i < fengHuoFtpData->fileNum; i++)
	{
		node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
		xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
		xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
		node2 = xmlNewNode(NULL, BAD_CAST"DATA");
		node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
		xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
		node4 = xmlNewNode(NULL, BAD_CAST"DATA");
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010032");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\t");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010033");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\n");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
		xmlNewProp(node5, BAD_CAST"val", BAD_CAST"WA_SOURCE_FJ_1001");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
		xmlAddChild(node4, node5);		
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"146");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"网安专用产品厂家结构组织代码");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010038");
		xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行");
		xmlAddChild(node4, node5);	
		node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010039");
		xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"字符集编码");
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
		node6 = xmlNewNode(NULL, BAD_CAST"DATA");
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST"");
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(fengHuoFtpData->ftpFiles[i].fileName)));
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
		char num[DEV_INFO_NUM_LEN] = {0};
		sprintf(num, "%d", fengHuoFtpData->ftpFiles[i].fileRows);
		xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
		xmlAddChild(node6, node7);
		xmlAddChild(node5, node6);
		xmlAddChild(node4, node5);
		node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
		xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
		xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
		xmlNewProp(node5, BAD_CAST"fieldcnt", BAD_CAST"17");
		node6 = xmlNewNode(NULL, BAD_CAST"DATA");
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C040002");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"MAC");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"终端MAC地址");
		xmlAddChild(node6, node7);
		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C010002");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"BRAND");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"终端品牌");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F030021");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CACHE_SSID");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"终端历史SSID列表");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010014");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CAPTURE_TIME");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集时间");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070003");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"TERMINAL_FIELDSTRENGTH");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"被采终端场强");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"B040001");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"IDENTIFICATION_TYPE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"身份类型");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"B040002");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CERTIFICATE_CODE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"身份内容");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070005");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SSID_POSITION");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"接入热点SSID");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070006");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"ACCESS_AP_MAC");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"接入热点MAC");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070007");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"ACCESS_AP_CHANNEL");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"接入热点频道");
		xmlAddChild(node6, node7);
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070008");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"ACCESS_AP_ENCRYPTION_TYPE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"接入热点加密类型");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070001");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"X_COORDINATE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"X坐标");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070002");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"Y_COORDINATE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"Y坐标");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020004");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETBAR_WACODE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所编号");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070011");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENTID");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备编号");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010018");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LONGITUDE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备经度");
		xmlAddChild(node6, node7);		
		node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
		xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010019");
		xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LATITUDE");
		xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备纬度");	
		
		xmlAddChild(node6, node7);		
		xmlAddChild(node5, node6);
		xmlAddChild(node4, node5);
		xmlAddChild(node3, node4);
		xmlAddChild(node2, node3);
		xmlAddChild(node1, node2);
		xmlAddChild(root, node1);
	}
    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
    return IF_APP_OK;
}


I32 CreateFengHuoDataPlaceXmlFile(KAUNGAUNG_FTP *fengHuoFtpData)
{
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
    root = xmlNewNode(NULL, BAD_CAST"MESSAGE");
    xmlDocSetRootElement(doc, root);


    node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
    xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
    xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
    node2 = xmlNewNode(NULL, BAD_CAST"DATA");
    node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
    xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
    node4 = xmlNewNode(NULL, BAD_CAST"DATA");
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010032");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\t");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符");
    xmlAddChild(node4, node5);
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010033");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\n");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符");
    xmlAddChild(node4, node5);
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"WA_BASIC_FJ_1003");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
    xmlAddChild(node4, node5);		
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"146");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
    xmlAddChild(node4, node5);	
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"网安专用产品厂家结构组织代码");
    xmlAddChild(node4, node5);
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
    xmlAddChild(node4, node5);	
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010038");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行");
    xmlAddChild(node4, node5);	
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010039");
    xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"字符集编码");
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST"");
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(fengHuoFtpData->ftpFiles[i].fileName)));
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
    char num[DEV_INFO_NUM_LEN] = {0};
    sprintf(num, "%d", 1);
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
    xmlAddChild(node6, node7);
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
	xmlNewProp(node5, BAD_CAST"fieldcnt", BAD_CAST"14");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020004");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETBAR_WACODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"上网服务场所编码");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F040002");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"PLACE_NAME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"上网服务场所名称");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020017");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SITE_ADDRESS");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所详细地址");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010016");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"LONGITUDE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所经度");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010017");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"LATITUDE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所纬度");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F040011");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETSITE_TYPE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所服务类型");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E010007");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"BUSINESS_NATURE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所经营性质");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020001");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"LAW_PRINCIPAL_NAME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所经营法人");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020003");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"LAW_PRINCIPAL_CERTIFICATE_TYPE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"经营法人有效证件类型");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020004");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"LAW_PRINCIPAL_CERTIFICATE_ID");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"经营法人有效证件号码");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"B070003");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"RELATIONSHIP_ACCOUNT");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"联系方式");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070009");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"START_TIME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"营业开始时间");
    xmlAddChild(node6, node7);		
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070010");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"END_TIME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"营业结束时间");
    xmlAddChild(node6, node7);		
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SECURITY_SOFTWARE_ORGCODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"厂商组织机构代码");
    xmlAddChild(node6, node7);		
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);
    xmlAddChild(node3, node4);
    xmlAddChild(node2, node3);
    xmlAddChild(node1, node2);
    xmlAddChild(root, node1);

    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
    //  xmlCleanupParser();
    // xmlMemoryDump();	
    return IF_APP_OK;

}

I32 CreateFengHuoDataFirmXmlFile(KAUNGAUNG_FTP *fengHuoFtpData)
{
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
	root = xmlNewNode(NULL, BAD_CAST"MESSAGE");
    xmlDocSetRootElement(doc, root);


    node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
    xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
    xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
    node2 = xmlNewNode(NULL, BAD_CAST"DATA");
    node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
    xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
    node4 = xmlNewNode(NULL, BAD_CAST"DATA");
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010032");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\t");
     xmlAddChild(node4, node5);
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010033");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\n");
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"WA_BASIC_FJ_1004");
    xmlAddChild(node4, node5);	
    	
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"146");
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"网安专用产品厂家结构组织代码");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010038");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010039");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"字符集编码");
    xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST"");
    xmlAddChild(node6, node7);

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(fengHuoFtpData->ftpFiles[i].fileName)));
    xmlAddChild(node6, node7);

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
    char num[DEV_INFO_NUM_LEN] = {0};
    sprintf(num, "%d", 1);
	xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
    xmlAddChild(node6, node7);
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
	xmlNewProp(node5, BAD_CAST"fieldcnt", BAD_CAST"6");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020014");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SECURITY_SOFTWARE_ORGNAME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"厂商名称");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SECURITY_SOFTWARE_ORGCODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"厂商组织机构代码");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020037");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SECURITY_SOFTWARE_ADDRESS");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"厂商地址");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020017");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CONTACTOR");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"联系人");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020020");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CONTACTOR_TEL");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"联系人电话");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"E020023");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CONTACTOR_MAIL");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"联系人邮件");
    xmlAddChild(node6, node7);
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);
    xmlAddChild(node3, node4);
    xmlAddChild(node2, node3);
    xmlAddChild(node1, node2);
    xmlAddChild(root, node1);
	
    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
    return IF_APP_OK;

}

I32 CreateFengHuoDataTerminalXmlFile(KAUNGAUNG_FTP *fengHuoFtpData)
{
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
	root = xmlNewNode(NULL, BAD_CAST"MESSAGE");
    xmlDocSetRootElement(doc, root);


    node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
    xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
    xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
    node2 = xmlNewNode(NULL, BAD_CAST"DATA");
    node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
    xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
    node4 = xmlNewNode(NULL, BAD_CAST"DATA");
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010032");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\t");
     xmlAddChild(node4, node5);
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010033");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\n");
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"WA_BASIC_FJ_1002");
    xmlAddChild(node4, node5);	
    	
    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"146");
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"网安专用产品厂家结构组织代码");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010038");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行");
    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
    xmlAddChild(node4, node5);	

    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010039");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"字符集编码");
    xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST"");
    xmlAddChild(node6, node7);

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
    xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(fengHuoFtpData->ftpFiles[i].fileName)));
    xmlAddChild(node6, node7);

    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
    char num[DEV_INFO_NUM_LEN] = {0};
    sprintf(num, "%d", 1);
	xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
    xmlAddChild(node6, node7);
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);

    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
	xmlNewProp(node5, BAD_CAST"fieldcnt", BAD_CAST"14");
    node6 = xmlNewNode(NULL, BAD_CAST"DATA");
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020004");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETBAR_WACODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所编号");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070011");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENTID");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备编号");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070012");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_NAME");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备名称");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070013");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_ADDRESS");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"设备地址");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070014");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_TYPE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备类型");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020013");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SECURITY_SOFTWARE_ORGCODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"安全厂商组织机构代码");
    xmlAddChild(node6, node7);
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010018");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LONGITUDE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备经度");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010019");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LATITUDE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备纬度");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070015");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"UPLOAD_TIME_INTERVAL");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"上传数据间隔时间");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070004");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_RADIUS");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集半径");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C030002");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"VEHICLE_CODE");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"车牌号码");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C030006");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SUBWAY_LINE_INFO");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"地铁线路信息");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C030007");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SUBWAY_VEHICLE_INFO");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"地铁车辆信息");
    xmlAddChild(node6, node7);	
    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"C030008");
    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"SUBWAY_COMPARTMENT_NUMBER");
    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"地铁车厢编号");
    xmlAddChild(node6, node7);	
    xmlAddChild(node5, node6);
    xmlAddChild(node4, node5);
    xmlAddChild(node3, node4);
    xmlAddChild(node2, node3);
    xmlAddChild(node1, node2);
    xmlAddChild(root, node1);
	
    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
    return IF_APP_OK;
}

I32 CreateFengHuoDataMacXmlFile(KAUNGAUNG_FTP *fengHuoFtpData)
{
	I32 ret = IF_APP_ERROR, i = 0;
	xmlDocPtr doc = NULL;
	xmlNodePtr root = NULL;
	xmlNodePtr node1 = NULL;
	xmlNodePtr node2 = NULL;
	xmlNodePtr node3 = NULL;
	xmlNodePtr node4 = NULL;
	xmlNodePtr node5 = NULL;
	xmlNodePtr node6 = NULL;
	xmlNodePtr node7 = NULL;
	doc = xmlNewDoc(BAD_CAST"1.0");
	if (doc == NULL)
	{
		cli_app_log(CLI_LOG_ERROR, "failed to create doc\n");
		return ret;
	}
	root = xmlNewNode(NULL, BAD_CAST"MESSAGE");
    xmlDocSetRootElement(doc, root);
	for (; i < fengHuoFtpData->fileNum; i++)
	{
	    node1 = xmlNewNode(NULL, BAD_CAST"DATASET");
	    xmlNewProp(node1, BAD_CAST"name", BAD_CAST"WA_COMMON_010017");
	    xmlNewProp(node1, BAD_CAST"ver", BAD_CAST"1.0");
	    xmlNewProp(node1, BAD_CAST"rmk", BAD_CAST"数据文件索引信息");
	    node2 = xmlNewNode(NULL, BAD_CAST"DATA");
	    node3 = xmlNewNode(NULL, BAD_CAST"DATASET");
	    xmlNewProp(node3, BAD_CAST"name", BAD_CAST"WA_COMMON_010013");
	    xmlNewProp(node3, BAD_CAST"rmk", BAD_CAST"BCP文件描述信息");
	    node4 = xmlNewNode(NULL, BAD_CAST"DATA");
	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010032");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"列分隔符");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\t");
	     xmlAddChild(node4, node5);
	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010033");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"行分隔符");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"\\n");
	    xmlAddChild(node4, node5);

	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"A010004");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集代码");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"WA_SOURCE_FJ_1002");
	    xmlAddChild(node4, node5);	
    	
	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"B050016");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据来源");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"146");
	    xmlAddChild(node4, node5);	

	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"G020013");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"网安专用产品厂家结构组织代码");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpcompany));
	    xmlAddChild(node4, node5);

	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"F010008");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据采集地");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST(dev_conf.ftp.ftpDataSource));
	    xmlAddChild(node4, node5);	

	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010038");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"数据起始行");
	    xmlNewProp(node5, BAD_CAST"val",BAD_CAST"1");
	    xmlAddChild(node4, node5);	

	    node5 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node5, BAD_CAST"key", BAD_CAST"I010039");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"字符集编码");
	    xmlNewProp(node5, BAD_CAST"val", BAD_CAST"UTF-8");
	    xmlAddChild(node4, node5);

	    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
	    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010014");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP数据文件信息");
	    node6 = xmlNewNode(NULL, BAD_CAST"DATA");

	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H040003");
	    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件路径");
	    xmlNewProp(node7, BAD_CAST"val", BAD_CAST"");
	    xmlAddChild(node6, node7);

	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010020");
		xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"文件名");
	    xmlNewProp(node7, BAD_CAST"val", BAD_CAST(shortname(fengHuoFtpData->ftpFiles[i].fileName)));
	    xmlAddChild(node6, node7);

	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I010034");
	    char num[DEV_INFO_NUM_LEN] = {0};
		sprintf(num, "%d", fengHuoFtpData->ftpFiles[i].fileRows);

		xmlNewProp(node7, BAD_CAST"val", BAD_CAST(num));
	    xmlNewProp(node7, BAD_CAST"rmk", BAD_CAST"记录行数");
	    xmlAddChild(node6, node7);
	    xmlAddChild(node5, node6);
	    xmlAddChild(node4, node5);

	    node5 = xmlNewNode(NULL, BAD_CAST"DATASET");
	    xmlNewProp(node5, BAD_CAST"name", BAD_CAST"WA_COMMON_010015");
	    xmlNewProp(node5, BAD_CAST"rmk", BAD_CAST"BCP文件数据结构");
		xmlNewProp(node5, BAD_CAST"fieldcnt", BAD_CAST"12");
	    node6 = xmlNewNode(NULL, BAD_CAST"DATA");
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F030011");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"AP_MAC");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"热点MAC地址");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F030001");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"AP_SSID");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"热点SSID");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F030022");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"AP_CHANNEL");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"热点频道");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"B040025");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"ENCRYPT_ALGORITHM_TYPE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"热点加密类型");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"H010014");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"CAPTURE_TIME");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集时间");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F030023");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"AP_FIELDSTRENGTH");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"热点场强");
	    xmlAddChild(node6, node7);
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070001");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"X_COORDINATE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"X坐标");
	    xmlAddChild(node6, node7);	
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070002");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"Y_COORDINATE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"Y坐标");
	    xmlAddChild(node6, node7);	
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"G020004");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"NETBAR_WACODE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"场所编号");
	    xmlAddChild(node6, node7);	
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"I070011");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENTID");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备编号");
	    xmlAddChild(node6, node7);	
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010018");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LONGITUDE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备经度");
	    xmlAddChild(node6, node7);	
	    node7 = xmlNewNode(NULL, BAD_CAST"ITEM");
	    xmlNewProp(node7, BAD_CAST"key", BAD_CAST"F010019");
	    xmlNewProp(node7, BAD_CAST"eng", BAD_CAST"COLLECTION_EQUIPMENT_LATITUDE");
	    xmlNewProp(node7, BAD_CAST"chn", BAD_CAST"采集设备纬度");
	    xmlAddChild(node6, node7);		
	    xmlAddChild(node5, node6);
	    xmlAddChild(node4, node5);
	    xmlAddChild(node3, node4);
	    xmlAddChild(node2, node3);
	    xmlAddChild(node1, node2);
	    xmlAddChild(root, node1);
	}
    xmlSaveFormatFileEnc("/mnt/usr/upload/GAB_ZIP_INDEX.xml", doc, "UTF-8", 1);
    xmlFreeDoc(doc);
    return IF_APP_OK;	
}
